In Install4j, how can I fix the error '' JVM could not start ''?

advertisements

After recently adding some more libraries to my install4j installer, some users are now getting an error message towards the end of the installation process that says.

"The JVM could not be started. The maxmimum heap size (-Xmx) might be too large or an antivirus or firewall tool could block the execution.

Log: C:\Users....\AppData\Local\Temp\i4j_nlog_203"

It only happens for some users, and restarting their computer, disabling their firewall/antivirus didn't help.

I found out that not adding a log4j appender that I was trying to add programatically at the point it gives this error, stops the crash from happening.

Here's the end contents of that log file leading up to the error.

Unpacking JRE done
JRE dir: C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\jre
LoadDLL (0, C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\jre, 0)
Got JRE location C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\jre (java exe: 0)
MinVersion: 1.6, MaxVersion:
Trying to load JVM-DLL from c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\java.exe
Setting PATH C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\TortoiseGit\bin;c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin
Trying c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\hotspot\jvm.dll (exists 0)
Trying c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\client\jvm.dll (exists 1)
Loading of JVM-DLL successful
unpacking i4jruntime.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\i4jruntime.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\i4jruntime.jar"
waiting for unpack200 to finish
unpack done
unpacking user\apache-mime4j-0.6.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\apache-mime4j-0.6.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\apache-mime4j-0.6.jar"
waiting for unpack200 to finish
unpack done
unpacking user\commons-io-2.0.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\commons-io-2.0.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\commons-io-2.0.jar"
waiting for unpack200 to finish
unpack done
unpacking user\commons-logging-1.1.1.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\commons-logging-1.1.1.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\commons-logging-1.1.1.jar"
waiting for unpack200 to finish
unpack done
unpacking user\derby.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\derby.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\derby.jar"
waiting for unpack200 to finish
unpack done
unpacking user\httpclient-4.0.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpclient-4.0.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpclient-4.0.jar"
waiting for unpack200 to finish
unpack done
unpacking user\httpcore-4.0.1.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpcore-4.0.1.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpcore-4.0.1.jar"
waiting for unpack200 to finish
unpack done
unpacking user\httpmime-4.0.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpmime-4.0.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpmime-4.0.jar"
waiting for unpack200 to finish
unpack done
unpacking user\ICEauthorization.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\ICEauthorization.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\ICEauthorization.jar"
waiting for unpack200 to finish
unpack done
unpacking user\IceCommon.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\IceCommon.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\IceCommon.jar"
waiting for unpack200 to finish
unpack done
unpacking user\installerCommon.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\installerCommon.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\installerCommon.jar"
waiting for unpack200 to finish
unpack done
unpacking user\log4j-1.2.15.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\log4j-1.2.15.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\log4j-1.2.15.jar"
waiting for unpack200 to finish
unpack done
unpacking user.jar.pack
c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin\..\bin\unpack200.exe
-r "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user.jar.pack" "C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user.jar"
waiting for unpack200 to finish
unpack done
launching program
GetTempPath returned 37 (last error 6)
make dir returned -1
adding options

vmoptions2: exe \\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.exe file: \\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.vmoptions, file: 00000000
vmoptions: opts2: \\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.exe.vmoptions, file: 00000000
vmoptions2: exe \\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.exe file: \\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.vmoptions, file: 00000000
vmoptions: opts2: \\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.exe.vmoptions, file: 00000000
default vmoptions file: 00000000
classpath entry
vmoption count 11
vmoption 0: -Dexe4j.semaphoreName=Local\__ice-catalogs.dirtt.local_catalog_installs_bundle_dml-gmk_2014_october_31_one-exe_bundle_dml-gmk-2014_10_31.exe
vmoption 1: -Dexe4j.isInstall4j=true
vmoption 2: -Dexe4j.moduleName=\\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.exe
vmoption 3: -Dsun.java.command=\\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.exe
vmoption 4: -Dexe4j.tempDir=C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714
vmoption 5: -Dexe4j.unextractedPosition=26428397
vmoption 6: -Djava.library.path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\TortoiseGit\bin;c:\users\avande~1\appdata\local\temp\e4j6cc6.tmp_dir1409859714\jre\bin
vmoption 7: -Dexe4j.consoleCodepage=cp0
vmoption 8: -Xmx300m
vmoption 9: -Dsun.java2d.noddraw=true
vmoption 10: -Djava.class.path=C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\i4jruntime.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\platform.zip;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\apache-mime4j-0.6.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\commons-io-2.0.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\commons-logging-1.1.1.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\derby.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpclient-4.0.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpcore-4.0.1.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\httpmime-4.0.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\ICEauthorization.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\IceCommon.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\installerCommon.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\log4j-1.2.15.jar;C:\Users\AVANDE~1\AppData\Local\Temp\e4j6CC6.tmp_dir1409859714\user\installerData.zip;
Creating JVM
JVM created
main class: com/install4j/runtime/launcher/WinLauncher
GetTempPath returned 37 (last error 0)
make dir returned -1
GetTempPath returned 37 (last error 183)
make dir returned -1
param count: 6
param 0: false
param 1: com.install4j.runtime.installer.Installer
param 2: \\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\error.log
param 3:
param 4: false
param 5: \\ice-catalogs.dirtt.local\catalog_installs\BUNDLE\DML-GMK\2014\October\31\one-exe\BUNDLE_DML-GMK-2014_10_31.exe
calling main
Java window visible
main returned
ERROR: an exception occured
ERROR: could not call main
ERROR: Could not start JVM


That is because of problem about memory chunk(See below reference for details). If the program has new version, use newer but sometimes programs dont have new version and you have to use it essentially. If any program(not just JProfiler) gives that problem, do below steps:

  1. Search for .vmoptions under the program folder.
  2. Open it with text editor.
  3. Decrease -Xmx size(try decreasing order, for ex: 512m,256m,128m,64m) until finding right size. For each size try to start the program.

Solution from Jetbrains