avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday January 19, 2021, 12:45 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Error while launching Java applications (solved)  (Read 17440 times)


  • Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 24
    • View Profile
    • Donate to Member
Error while launching Java applications (solved)
« on: May 10, 2012, 01:16 PM »
I've seen interesting issue and found a workaround. I'm posting here in case anyone will have this issue too.

I have Java application with exe launcher and splash screen (“PhpStorm.exe”, “idea.exe”). Recently it stopped launching with error:
The JVM could not be started. The maximum heap size (-Xmx) might be
too large or an antivirus or firewall tool could block the execution.
Error log of application:
Creating JVM
ERROR: could not initialize JVM
Hiding splash screen
Default options are (“PhpStorm.exe.vmoptions”):
FARR sometimes can launch application, and sometimes can not (error message). If I launch directly, it always works.

If I raise maximum heap size to 1200 MB (“-Xmx1200m”), FARR will never be able to launch application, but manual launch will still work.

This issue is explained here: "The JVM could not be started. The main method may have thrown an exception" error when starting idea.exe :: JetBrains Developer Community:
It happens because the native idea.exe executable built with the exe4j uses the splash screen which loads a dll (to decode the splash image) in the address space of the process. The jvm.dll loaded after the splash needs to allocate the heap memory in one chunk, however the dll loaded before the jvm.dll can fragment the address space (limited to 2GB for the 32-bit applications) too much and there will be no single chunk of free memory required for the JVM to initialize.

Depending on the other DLLs loaded, applications with DLL hooks and drivers installed on the system, IntelliJ IDEA may be not able to start even with relatively low heap size of 512m.
To make it work again with FARR you should uncheck (Program Options → Settings → Launching Files):
[ ] Use file launch helper utility

Alternative way - uncheck:
[ ] Always launch shortcuts directly instead of resolving links

You don't need to lower maximum heap size (-Xmx).
Seems that launch helper somehow changes memory allocation of child process and application can't launch.

I've unchecked “Use file launch helper utility” and all is working correct now (and I still can launch *.doc, Word 2010, etc).

Environment: Java 1.6.0_31, Windows 7 x64, FARR v2.105.01.
« Last Edit: May 10, 2012, 01:26 PM by Vanav »


  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,435
    • View Profile
    • Mouser's Software Zone on
    • Read more about this member.
    • Donate to Member
Re: Error while launching Java applications (solved)
« Reply #1 on: May 13, 2012, 01:39 AM »
Thanks for posting this solution Vanav  :up:
I clearly have to study the side effects of some of those launch options in FARR..