Eclipse IDE fail to launch with JVM Terminated. Exit code=-1

删除回忆录丶 提交于 2019-12-06 00:42:03

问题


I was having an issue with Eclipse IDE failing to launch with following error message: "JVM Terminated. Exit code=-1"

After some googling, I've semi-unintentionally found the solution and was able to get the IDE to launch correctly. What I did was to set -Xmx JVM argument in eclipse.ini to a value that is lower than the default value specified (-Xmx512m). Although I was able to get the IDE to launch, I was curious as to why it was happening and why this solution worked.

Here are some environment info:
Eclipse IDE: eclipse-rcp-galileo-SR1-win32
JVM: Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Physical Memory: 2GB

Available memory at launch time for >1GB.

Initially, I changed the value to 256m and Eclipse launch correctly and after some experiment I found out that it launches correctly until it is set to 348m. However, once the value is set to 349m, I get a dialog with the above error message. The full message is:

JVM terminated. Exit code=-1
-Dosgi.requiredJavaVersion=1.5
-Xmx349m
-XX:MaxPermSize=256m
-Djava.class.path=C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-os win32
-ws win32
-arch x86
-showsplash C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\\plugins\org.eclipse.platform_3.3.201.v200909170800\splash.bmp
-launcher C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\eclipse.exe
-name Eclipse
--launcher.library C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
-startup C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-product org.eclipse.epp.package.rcp.product
-vm c:\tools\java6\bin\..\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xmx349m
-XX:MaxPermSize=256m
-Djava.class.path=C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar

Does anyone have any idea or clue as to why this may be happening??

Thank you.


回答1:


Try out this one

C:\dev\IDE\eclipse332\eclipse.exe -vm C:\dev\JDK\j2sdk1.4.2_06\bin\javaw.exe -vmargs -Xmx1024M -Xms512M

I also had problems with more memory. But this was working for me. I am sorry, but i do not know how to configure it correctly.




回答2:


I had the same problem. You must be running 64-bit Windows. For some reason Eclipse is looking for 32-bit Java Run time so you need to download and install 32 bit version. Also make sure Path Variable in Environment variables is set to 32 Bit Path




回答3:


This blog mentions a similiar problem and provides a solution. And he's referring to this forum thread discussing the same exit code -1 issue with eclipse.

(Looks like I'm happy that my eclipse didn't crash like this .. yet)




回答4:


I managed to launch studio by editing ini and reducing XXMaxPermSize to 128m.

--launcher.XXMaxPermSize
128m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx1024m



回答5:


I use the following to start eclipse. It's working:

E:\tools\eclipseR30\eclipse.exe -data E:\workspaces\r30 -vm C:\Java\jdk1.5.0_16\jre\bin\javaw.exe -jvmargs –Xms512M –Xmx512M

Or you can add -vm C:\Java\jdk1.5.0_16\jre\bin\javaw.exe in eclipse.ini.




回答6:


I managed to fix this by installing 32-bit JRE. Looks like eclipse is looking for 32-bit version




回答7:


i got this JVM terminated. Exit code=-1 message to, after alot of google search i found out that my eclipse was only for 32 bit(europe 3.3.2) and i had windows 64 bit, so the path to my jdk was to my 64 bit programfiles folder, not to programfile(x86) folder and i changed that in my eclipse.ini to:

-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256M -vm C:\Program Files (x86)\Java\jdk1.7.0\jre\bin\server\jvm.dll -vmargs -Dosgi.requiredJavaVersion=1.7 -Xms40m -Xmx256m

i dont know if its ontopic but if someone get the same message i hope this helps:)




回答8:


I was also getting the same error, you can fix it by following the below steps.

  1. Open the 'eclipse.ini' file in the notepad
  2. Search for '-vm' if found change the value as '-vm C:\Program Files\Java\jdk1.6.0_23\jre\bin\javaw.exe' (depending on your java installation path)
  3. if you didn't find '-vm' in the 'eclipse.ini' file, then add the '-vm C:\Program Files\Java\jdk1.6.0_23\jre\bin\javaw.exe', anywhere I pasted under the '-showsplash'.
  4. launch the eclipse, by clicking on the 'eclipse.exe'.

Let me know if still not working!




回答9:


I had a similar issue with my Clear Case Remote Client in Windows.

All I had to do is to open the "ccrc.ini" usually available at "C:\Program Files\IBM\RationalSDLC\clearcase\RemoteClient" and update the below argument to refer from JRE on my desktop

OLD Entry: -vm C:\Program Files\IBM\RationalSDLC\common\JAVA5.0\jre\bin\j9vm\jvm.dll

New Entry: -vm C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe




回答10:


With my personal experience, this issue happens for many reasons like JVM Supported version, Heap size allocation, change in eclipse ini file that doesn't match with the System configurations, etc.

I faced the same such issue for one reason, Increased my Maximum heap size to -Xmx1024m from -Xmx256m in my eclipse.ini file for some heap size issue.

But after some time it started giving me issue stating "Eclipse IDE fail to launch with JVM Terminated. Exit code=-1". I think it happened because of my available heap size in my system was not sufficient to open the Eclipse due to the other processes that was running in my System. Just for a quick fix i changed the -Xmx1024m to -Xmx512m and then it started working fine.

-Karthik Kornalies




回答11:


i had same issue . I have 64 bit windows 7.I un-installed 64bit java and jre . tried with 32 bit java and jre and issue has been fixed.




回答12:


Try out these things:

  1. First set the proper requirements as per your RAM size in the ini file.

  2. Check whether you have the proper version of the JVM and the class path is set correctly in your environment variables as well as the one in the ini file.

  3. Try running it from the command prompt rather than double clicking on the exe.




回答13:


@blissfool: You are getting this error because available user heap might be lesser than the heap mentioned(i.e. 512 mb). That's why this was working when you reduced the heap size.




回答14:


Verify your Java/JDK/Jre installation path. The identical problem was resolved on Ubuntu by running:

$ sudo update-alternatives --config java

Then picking an alternate of the multiple java version installations. Apparently one has some flaw.

Ubuntu's update-alternatives sets all the needed path values automatically in Linux. For Windows, you might have to check them manually or perform new JDK/Jre installation to ensure the installation and path integrity.




回答15:


cannot-run-eclipse-jvm-terminated-exit-code-13

Above error can be resolved in simple way.

1.Have a look in system variable path. We will get:

C:\ProgramData\Oracle\Java\javapath; 

2.Remove or delete from "path" and check java version on cmd prompt , it should match with your java home. Now start eclipse, and it will work.




回答16:


I downloaded the latest visual studio redistributable package at http://www.microsoft.com/en-us/download/details.aspx?id=5555 and it seems to resolve the issue. I DL both the 32bit and 64bit for what it was worth.




回答17:


It looks JVM problem. You can try to download JRockit and set your env variable to JRockit JVM. It should fix the problem.



来源:https://stackoverflow.com/questions/2087004/eclipse-ide-fail-to-launch-with-jvm-terminated-exit-code-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!