Eclipse: JVM Terminated. Exit Code=-1 SOLUTION

by troy on June 8, 2008

Recently, for unknown reasons, starting up Eclipse gave me a nasty screen of errors, starting with:
JVM Terminated. Exit Code=-1

eclipse jvm terminated exit code -1

I've been using Eclipse and FDT for years, and this was the first time I've seen that so was stumped for a bit. Doing a search, gave numerous people running into similar problems, but frequently the error code was different, I'm not sure if "Exit Code =1" is a legitimate error or search engine indexing '-1' as '1'

What did work initially was removing the eclipse.ini, but then there wasn't enough memory being allocated for FDT (eclipse.ini has optional arguments '-Xmx' to tell the Java Runtime how much memory to save

Digging it turns

-vmargs was able to turn on/off the error. But then FDT wouldn't have enough memory to run :(

Having had the Java runtime recently upgrade itself to 1.6, thought that was most of it.    In the end, along with some other nasty issues (Explorer.exe taking 50% of the CPU and taking down any process)...I just ended up reinstalling Windows....joy.

It's working now, it  turns out that the first param needs to be in front of the others, and I've had stability issues when the value is high (e.g. MaxPermSize=512M).  Even though I have 3GB Ram, something between the JVM and Windows doesn't like it.

-XX:MaxPermSize=256M
-vmargs
-Xms40m
-Xmx768m

[UPDATE 10-28-08]
There have been several suggestions in the comments, I got this exact issue again when installing FDT 3.1 stand alone. I tried renaming the eclipse.exe to eclipse1.exe, but this appears just to bypass the similarly named eclipse.ini, forcing it to restart to defaults. Which in my case with FDT 3.1 didn't work, as it needs lots of memory. Using the same approach of using an updated config file fixed it, which I've uploaded here:
fdt-3.ini (note rename it to eclipse.ini if you are using eclipse instead of the FDT version of eclipse.

{ 3 trackbacks }

Rien de spécial » Blog Archive » Eclipse. JVM Terminated -1
August 7, 2008 at 7:01 am
Java on Mac « dctucker’s developer blog
March 30, 2009 at 12:11 pm
links for 2009-06-22 « that dismal science
June 22, 2009 at 3:32 pm

{ 64 comments… read them below or add one }

Michael Ebbage December 15, 2009 at 11:55 am

Thanks, this sorted my issue.

I removed the existing JVM settings in the Eclipse.ini with your suggestion – now I’m running again :D

zomb December 19, 2009 at 8:48 am

I’ve tried everything on the site with no results.

After I updated Eclipse to Galileo (was Ganymedes) it stopped working

I tried renaming the file, and the error message, while still exit code -1, just changed.

I installed a very old eclipse 3.2 that I found lying around, and that doesn’t work either.

Re-installing the java jre with the newest 64-bit didn’t for either eclipse.

I don’t know what else to try besides re-installing windows vista.

troy December 19, 2009 at 9:02 am

Maybe you have a rogue JVM? try uninstalling all the java JRE/JVMs, test Eclipse – it shouldn’t be able to start, then install the JRE that worked. try a fresh eclipse folder, that out of the box with no plugins shouldn’t give you any issues. Unfortunately I’m just shooting in the dark.

Don December 20, 2009 at 8:50 pm

Being specific about the vm in eclipse.ini works.
-vm
c:\path..\javaw.exe

I believe QuickTime overrode the default jvm in XP.

zomb December 21, 2009 at 11:58 am

Uninstalling & chocking if there are no rogues (there were none) and reinstalling didn’t work

These are the errors I get.
[IMG]http://i288.photobucket.com/albums/ll196/zomb1986/eclipseerror.png[/IMG]

Left the original eclipse.exe, right the one I renamed.
For your convenience, I highlighted in red the parameters that are missing on the right.

Dr Mhz January 10, 2010 at 9:07 am

Waleed’s suggestion was an ez fix. Thanks!

Start Chrome and run the java test from java.com. This ‘jump started’ the JVM and then eclipse started working.

Andres January 14, 2010 at 1:27 am

I was having the same issue with eclipse until I installed the Eclipse IDE for Java Developers

Diman January 19, 2010 at 2:46 am

Facing the same error message with “eclipse-jee-galileo-SR1-win32″ in my Win XP. After long trying I simple removed in eclipse.ini this lines:
——————————————————
org.eclipse.platform
–launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
——————————————————–
now it starts and works!?

Bill Lahti January 20, 2010 at 7:29 am

It looks people have found explanations and got their Eclipses going again. But I’d like to add one more thing to look for.

I had all the same problems with Eclipse. Mine turned out to be a virus: Packed.Win32.Krap.X, which had somehow invaded the heap address space of Eclipse. I ended up restoring Windows XP (although I should have tried a few more things suggested by Zone Alarm — I found them too late). Problem with Eclipse and my ancient Gnu Emacs went away.

By the way, changing the max heap size provided the clues that helped. I found it did not run with -Xmx256m but would run with -Xmx192m. Then I got a strange warning that my task manager had been disabled by an admin. That and a Google search being redirected to some place trying to sell me stuff.

zomb January 23, 2010 at 10:04 am

I found the fix that worked for me!

I had to install 32-bit JRE beside my 64-bit JRE, and now it works. (I had to lie about my operating system on Sun’s website to obtain it O_o)

I found out about this through an unrelated update of Vuze, which complained it did not find a JRE, and after pointing it to it, it complained that it was damaged and not a valid 32-bit JRE.

Amit January 25, 2010 at 5:08 am

Thanks buddy…
I removed eclipse.ini and it worked :-) You saved lot of my time.. Thanks again..

Cheers,
Amit

django January 27, 2010 at 6:29 pm

After following Diman suggestion, I was able to get eclipse working again.

btw, this might have happened when my PC was infected with InternetSecurity 2010 virus..

thanks.

Rommel February 3, 2010 at 12:44 pm

This is what I have for the eclipse installed from this zip file eclipse-jee-galileo-SR1-win32.zip and it works. But changing the -Xmx to 2048m stops right there.

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
–launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx1024m

Sikor February 24, 2010 at 10:49 am

I tired editing eclipse.ini nothing worked. Finally I deleted the file and similarly to Amit everything works fine again :) .

T

Leave a Comment

Previous post:

Next post: