在Install4j中,如何修复“JVM无法启动”错误?

时间:2014-09-05 15:39:18

标签: java jvm log4j install4j

最近在我的install4j安装程序中添加了一些库之后,一些用户现在在安装过程结束时收到一条错误消息。

“无法启动JVM。最大堆大小(-Xmx)可能太大,或者防病毒或防火墙工具可能阻止执行。

日志:C:\ Users .... \ AppData \ Local \ Temp \ i4j_nlog_203“

只有某些用户才会这样做,并且重启他们的计算机,禁用他们的防火墙/防病毒软件也无济于事。

我发现没有添加一个log4j appender,我试图以编程方式添加它会导致此错误,从而阻止崩溃发生。

这是导致错误的日志文件的最终内容。

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

2 个答案:

答案 0 :(得分:1)

这是由应用程序主线程中引发的异常引起的。通常会在错误窗口中捕获并显示这些异常,但如果在显示窗口时发生另一个异常,您将只获得您观察到的日志文件条目。

可能导致此问题的异常是OutOfMemoryError,尤其与PermGen空间有关。

答案 1 :(得分:1)

这是因为有关内存块的问题(有关详细信息,请参阅下面的参考资料)。如果程序有新版本,请使用较新版本,但有时程序没有新版本,您必须使用它。如果任何程序(不仅仅是JProfiler)提出了这个问题,请执行以下步骤:

  1. 在程序文件夹下搜索.vmoptions。
  2. 使用文本编辑器打开它。
  3. 减小-Xmx尺寸(尝试减少顺序,例如:512m,256m,128m,64m),直到找到正确的尺寸。对于每种尺寸,尝试启动该程序。
  4. Solution from Jetbrains