Recently, for unknown reasons, starting up Eclipse gave me a nasty screen of errors, starting with:
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 }
{ 68 comments… read them below or add one }
same problem here.
solution: changing “-Xmx512m” to “Xmx256m” in eclipse.ini
Same problem here. Two recent updates on my computer that could be relevant are: java vm auto update, and installing the Chrome browser. My bet it’s the java vm update, but I have no way to prove it.
After digging a little bit, I realized that the java vm could not be created. However, if I open the java.com site with Chrome and do the install verification process it works. And after that step, Eclipse works as well. Looks like the browser managed to get the vm running and eclipse just used it.
Solution : Just rename ur eclipse.exe to eclipse1.exe and restart ur server. It will work.
Wow he’s right, running the check to start up the jvm worked. I also had the same possible changes, a java auto update and installing chrome so I’m not sure which is the cause yet. This is on Vista
Tried to run GoToMeeting using Chrome, which kicked off a Java autoupdate – and this, in turn, produced a box with this error: “VM terminated. Exit code =-1″ — copied a friends’ eclipse.ini file, to no avail. Then tried swathi’s solution (#4) – no idea why, but it works.
download JRE 1.5.0 any update, create a shortcut ‘eclipse -vm …\jre1.5.0_15\bin\javaw’, take eclipse to point JRE 1.5.0 virtual machine, try it!
Thanks alan this works!
I had the same problem – eclipse just stopped working all of a sudden after a corporate update. I tried all other suggestions on this site, and lastly tried what Swati recommended, and believe it or not, that’s the only one that worked (renaming the eclipse.exe!!!)
here what solved it for me:
eclipse1.exe” -vm “c:\Program Files\Java\jdk1.6.0_07\bin\javaw.exe”
Hi All,
Updating eclipse.ini was saver for me. Cheers guys.
Thanks for this, I was able to figure out my issue as a result.
For me, the issue came from running Windows 7 64 bit. I had a 32bit JRE due to Firefox, but when I DLed JDK I automatically got their 64 bit version. Turns out that eclipse does not work with said 64bitJDK [at least in Windows, perhaps their Linux 64bit distro works]. I DLed the 32bit JDK and pointed eclipse to it using the “-vm” command, and I was up and running.
Waleed’s solution worked for me. It was because i was using Google Chrome. Simply went to the Java website, went for the download and it recognised i was using chrome. Then when i went to run Eclipse, it downloaded additional components and ran as it did previously.
Even I was facing same problems for 2 weeks. I tried changing the Java preferences and running eclipse it was not working. At last I found the way to run it.
If you have installed JDK 1.6 on a 32 bit system, eclipse will not work. To remove the JDK 1.6 you need to remove all versions of Java installed on your system. You can remove that using following command.
sudo rm -rf /System/Library/Frameworks/JavaVM.framework/Versions/
Once you remove java, you can check it using the Terminal and giving command
java -version
Now its time to install JDK 1.5 on your system. To get the Java update visit this link and download and Install this update.
http://www.apple.com/support/downloads/javaformacosx105update2.html
Next step is to set default JDK for your system.
Go to Applications->utilities->Java->Java Preferences
Drag J2SE 5.0 (32 bit) to the top level in both Java Applet Version and Java application Version.
Now you all set
Check the current version using java -version command at termnal.
It will show like
java version “1.5.0_16″
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
Now run eclipse in normal way, it will come up.
Thanks
-Pranay Kondekar
I had this exact problem after I installed Windows 7 RC1 32bit. I used chrome to download the java vm. Decided to do some work, and Eclipse wouldn’t work. Followed Waleed’s advice, went back the java website and went to the “How do I test whether Java is working on my computer?” page underneath the download button. It eventually loaded and Eclipse started to work as well. As a note, this was the latest Chrome, 7, JVM, and Eclipse as of 5-11-09. Hopefully this will work for you, it is definitely the easiest solution.
The option is to manually delete the cache file, which is C:Documents and Settings\Local SettingsApplication Datajavasharedresources. Navigate to the directory and look for a file called C23D1A32_sharedoc__G01 and delete this file.
I tried Swathi’s and it worked like magic. But, still don’t understand how/why it worked.
Hello,
the same problem :
jvm terminated.Exit code=-1
-Dosgi.requiredJavaVersion=1.5
……
the solution :
changing eclipse.exe to eclipse1.exe and 512 to 256 in the eclipse.ini
good luck
Hi,
I am also having same problem.
JVM terminated. Exit code=1
/usr/bin/java
I am using RHEL.
i have tried ./eclipse -vm /Softwares/jdk1.5.0_06/jre/bin/javaws
also. But still getting error.
Any one haiving idea abt this on Linux.
Thanks in advance.
Sridhar
Alan’s solution works for me. I created a shortcut:
eclipse -vm /usr/lib/jvm/java-6-sun/bin/java
(i work on ubuntu 9.04, and i had installed “sun-java6-jre” in Synaptic)
my eclipse stopped when i rebuild the index, now after rebuild the index everything is going ok
I ran into this and noticed the following error on my command line:
“cannot restore segment prot after reloc: Permission denied”
Which led me to this resolution; which works:
http://www.appistry.com/community/forums/content/cannot-restore-segment-prot-after-reloc-permission-denied
eclipse1.exe worked for me in XP Pro 64bits
Changing the name of the exe file works because it is no longer equals to the name of the ini file, which is the one causing the problem (something with the max value of memory). Therefore it is not really a solution since I want to use the current defenitions in the ini file and not the default ones.
thanks HadesScorn,
I’m using windows 7 64 bit and tried almost everything with no avail, but then downloaded the 32 bit JDK and pointed to it from eclipse and it worked.
I get the same JVM terminated EXit Code =-1
am unable to paste the snap shot here.can somebody tell me how to do it.so that I can show my problem clearly
Renu’s comment work for me..
Deleting the shared file in the c:\Documents and Settings\\Local Settings\Application Data\javasharedresources\ makes my RSA work fine again.
Hi folks,
I ran into this issue after an upgrade to eclipse (3.4). I fixed it by creating a default.ee file in the directory with eclipse.exe. In ‘default.ee’, I put whatever vm options I wanted, and eclipse started right up.
Here is a list of all options that can go in an ee file: http://wiki.eclipse.org/Execution_Environment_Descriptions
And here’s the bug that pointed me to this solution:https://bugs.eclipse.org/bugs/show_bug.cgi?id=143799
Hope this helps.
deleting eclipse.ini worked well for me….
Renu’s solution worked for me. Thanks Renu! Thanks everyone!
Try renaming ur profile and creat a new one. It worked for me.
Try this for Mac OS X
http://knowledgeexplosion.info/index.php/Technical/2009/07/25/resolved_jvm_terminated_exit_code_1_ecli
I encountered this problem and cannot even identify a system change that might have caused it. I had not changed my Eclipse version or my JVM version. I am running Win XP Pro SP 3. But renaming my eclipse.ini file seems to have solved the problem.
changing eclipse.exe to eclipse1.exe works
thnx
Thanks…. it helped me lot…
Avik & Gourab
I deleted most of the contents of my eclipse.ini, then added lines back a few at a time. There is a line that is simply “-showsplash” that was causing the problem for me. Removing it makes Eclipse work, adding it back causes the error you are seeing.
It may not be everyone’s problem, but it was mine…
Thanks alex2308 ;
“solution: changing “-Xmx512m” to “Xmx256m” in eclipse.ini”
It works…
//GG
It seems the eclipse.ini becomes ‘corrupt’. I used notepad to edit eclipse.ini replacing all strange characters with the desired newline or space characters, but otherwise left it as is.
-showsplash org.eclipse.platform
–launcher.XXMaxPermSize 256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
Works!
Hi.. I have been receiving these errors ..ever since i upgraded my rational software architect 7.0.. which also upgraded my eclipse version.. Ok .. here is the error message which was generated..
JVM terminated. Exit code=127
/opt/IBM/SDP70/jdk/jre/bin/javaw
-Xquickstart
-Xms40m
-Xmx1028m
-Xgcpolicy:gencon
-Xscmx96m
-Xshareclasses:singleJVM,keep
-XX:MaxPermSize=512M
-jar /opt/IBM/SDP70/./startup.jar
-os linux
-ws gtk
-arch x86
-launcher /opt/IBM/SDP70/./eclipse
-name Eclipse
-showsplash 600
-exitdata cc8007
-vm /opt/IBM/SDP70/jdk/jre/bin/javaw
-vmargs
-Xquickstart
-Xms40m
-Xmx1028m
-Xgcpolicy:gencon
-Xscmx96m
-Xshareclasses:singleJVM,keep
-XX:MaxPermSize=512M
-jar /opt/IBM/SDP70/./startup.jar
I’m a newbie to programming java, in fact I consider myself at this point a dumb html guy. I’ve only been working with Java and eclipse for about a month and when I hit this startup problem I had no idea what to do. This forum was a godsend!
I don’t know what I did, but I must have done something to cause this. Anyway, I followed the suggestion of changing the -Xmx512m to -Xmx256m in the .ini file and it worked like a charm.
Thanks!
hi..
I am same problem on installation on eclipse they have a fix jvm is terminted….so you have help me installation on eclipse.
Updating eclipse.ini was solved the problem.
Cheers.
–>same problem here.
–>solution: changing “-Xmx512m” to “Xmx256m” in eclipse.ini
Eclipse: JVM Terminated. Exit Code=-1
after Java 6 was downloaded and installed
Updating my eclipse.ini file solved it for me
I deleted the duplicate –launcher.XXMaxPermSize 256M in the file.
BEFORE
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.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
-Xms40m
-Xmx512m
AFTER
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.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
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
i just want to thanks swathi…….. swathi u r great…….your solution is right and simple…….
thanks HadesScorn,
I’m using windows 7 64 bit and tried almost everything with no avail, but then downloaded the 32 bit JDK and pointed to it from eclipse and it worked.[2]
This work for me..good luck.
Muchas Gracias. Me ha servido de mucho
Thx, HadesScorn!
I’m using Win 7 RTM; the 32-bit JDK works like a charm.
I simply added -vm option to the eclipse.ini to use jdk 5. Here is how it looks like now:
-vm
C:\Program Files\Java\jdk1.5.0_19\bin\javaw.exe
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256M
-framework
plugins\org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx1024m
-Djava.net.preferIPv4Stack=true
Thanks a lot dear friends . I was having that problem. and got out of it by renaming as eclipse1.exe thanks a lot
Gungor, thanks a lot, that was the perfect solution, it works for me now.
gungor August 22, 2009 at 9:13 pm
Thanks alex2308 ;
“solution: changing “-Xmx512m” to “Xmx256m” in eclipse.ini”
It works…
//GG
Deleting file in directory C:\Documents and Settings\«your_username»\Local Settings\Application Data\javasharedresources\ worked for me. Thank’s Renu.
Thanks HadesScorn!!
I’m running windows 7 64-bit JDK 6 64-bit and I couldn’t get eclipse php to work for the life of me none of these other solutions worked.
Simply install jdk 32-bit, point using VM command and viola
Why doesn’t eclipse just detect and verify or install the correct JDK instead of all this mess??