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

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.


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

{ 80 comments… read them below or add one }