6

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.

3
  • wow, scary, 512m is my standard value ;) hardware problem with physical memory? Is it the same limit after restarting the machine? Commented Jan 18, 2010 at 15:46
  • Hmm. Interesting. If you look at the error message above, the jvm used by the core package is c:\tools\java6\bin\..\jre\bin\client\jvm.dll. It works fine if I do: eclipse -vm c:\tools\java6\jre\bin\javaw.exe -vmargs -Xms40m -Xmx512m And I get the same problem if I do: eclipse -vm c:\tools\java6\jre\bin\client\jvm.dll -vmargs -Xms256m -Xmx512m Something to do with jvm.dll? Commented Jan 19, 2010 at 18:26
  • I am also hit with this same exact problem. Looks like there is not silver bullet to this issue... Commented May 29, 2012 at 4:09

17 Answers 17

3

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.

Sign up to request clarification or add additional context in comments.

Comments

3

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

2 Comments

I do not have 64bit Windows and all paths are set correctly. I think there are numerous solution to this issue depending on the situation. One being what you've suggested, another being lowering -Xmx value and, yet another being using javaw.exe instead of jvm.dll.
This was the problem in my case. I worked around it by creating a shortcut to Eclipse and manually passing the path to the 32-bit javaw.exe for the -vm argument, as is mentioned below.
1

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)

3 Comments

Thanks. I've already read that thread. :) I know how to get my eclipse working... it's just bugging me as to why it's doing it... interestingly enough, I didn't have the problem with the java developer version package(eclipse-java-galileo-SR1-win32) which I have been using so far before downloading this package for plug-in development...
Ugh. The default in java dev pkg was "-Xmx256m". When I changed it to 512m, crash!
@Andreas_D: The link is now dead. Do you remember what it said? I'd love to see what they said about it...
1

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

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

Comments

1

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.

Comments

0

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

Comments

0

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:)

1 Comment

If you are not sure about offtopic you should not post this as an answer.
0

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!

Comments

0

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

Comments

0

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

Comments

0

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.

Comments

0

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.

Comments

0

@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.

Comments

0

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.

Comments

0

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.

Comments

-2

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.

1 Comment

He's asking for Eclipse solutions, not Visual Studio.
-3

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.