xiaoxing tech

July 25, 2007

JVM terminated. Exit code=-1

Filed under: Eclipse — xiaoxing @ 4:33 pm

Can’t open Eclipse.

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=12&t=004485

Symptom:
When starting IBM’s Rational Application Developer (IRAD 7) using eclipse.exe, you get the following error:
JVM terminated. Exit code=1
C:\Program Files\IBM\SDP70\jdk\jre\bin\javaw.exe
-Xquickstart
-Xms512m
-Xmx1024m
-Xgcpolicy:gencon
-Xsharedclasses:singleJVM,keep
-Xnolinenumbers
-XX:MaxPermSize=1024
blah…blah…blah
Problem: eclipse.ini file duplicates existing configuration entries

Quick fix:

 backup the eclipse.ini file,

 and then blank out the origial

 so there is no text in the

eclipse.ini file

 

(deleted content:)

-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
128M
-vmargs
-Xms40m
-Xmx512m

Proper fix: call IBM support and follow thier instructions. This is not an IBM supported, or IBM recommended fix.
Long, Self-Indulgent, Dialog:
Okay, it’s Christmas, and the best gifts to give are the ones you give yourself. So, I went out and bought myself a refurbished eMachine with a semaphone processor and 1.5 Gigs of RAM. IRAD 7 has just been released, and I wanted a taste of it. Some people spend time with their families at Christmas – I spend time with my computer.
Anyways, I’m a total WebSphere dude, so I was looking forward to installing and testing out IRAD 7. I downloaded like 10 CDs worth of files from IBM, and began the install.
The installation begins with the installation of an installation installer. This always annoys me. Why am I installing an installer to install a product? Why can’t I just install the product? Well, I know the idea – that the IBM Installation Manager can manage the installation, just like Java Web Start technology, or even Windows Update. Still, it annoys me, but I do accept that the people at IBM are much smarter and wiser than me, so I defer to their greater wisdom.
The installation went smoothly, and I selected just about every option possible, with an eye on Portal development tools, as that’s what’s on my plate right now. The installation went well, and after completion, the IRAD tool started up, and I created a workspace and a project. Life was good.
I shutdown the eMachine, and came back about a day later. When I rebooted, I got the annoying message that siad JVM Terminated. Exit Code=1
I googled the error, and realized that I wasn’t the only person running into the problem.
This thread suggested that the metadata/lock file was the problem, especially if eclipse didn’t shut down correct. I had a lock file and deleted it, but still, Exit Code=1 kept coming up.
Digging a little deeper, this other thread suggested I needed to install JDK 1.5, and set the PATH and JAVA_HOME. It suggested that IRAD might get upset if there was another JDK version on the filesystem or something. Now, this seemed strange, because I had a brand new operating system, with nothing but a barebones Windows XP. There was no DB2 or Oracle that might surreptitiously have installed a JDK. Furthermore, IRAD installs its own JRE 1.5, so it should be using its own. Still, I set the PATH and JAVA_HOME to point at the JDK installed by the glorious Installation Manager. I rebooted, but still, I kept getting JVM Terminated. Exit Code=1
Now, somebody mentioned that maybe I should up the Xms512 to somethig larger. Pehaps the JVM wasn’t getting enough memory. However, the launcher just called the eclipse.exe file. I was curiousas to where the parameters were being initialized, which is what lead me to the eclipse.ini file.
Now what I noticed was that the things that were being displayed in the error weren’t in the same order as the eclipse.ini file. When I looked closer, I saw that parameters for a javaw.exe were being set, and then they were being SET AGAIN, and the second time around, the initializations were in the same order as the eclipse.ini file. So, eclipse was getting run with various initialization parameters, and then it was reading the eclipse.ini file, and trying to do all the initializations again.
So, I backed up the eclipse.ini file, and then erased the contents of the original. Then I launched IBM’s Rational Application Developer 7, and guess what? The darn thing started up.
I shut it down and replaced the new eclipse.ini file with the old one, and guess what? JVM Terminated: Exit Code 1.
So, it looks like the fabulous installation manager is managing to incorrectly configure IRAD 7, especially when you choose to install almost all of the funky features like portal and so on.
Still, it’s just a little bump in the road. I can’t wait to see what else IRAD 7 has in store for me.
Happy WebSphere!
-Cameron McKenzie

[ December 26, 2006: Message edited by: Cameron W. McKenzie ]

16 Comments »

  1. Hey there,

    thanks for the fix. It works!

    cheers,
    niraj

    Comment by Niraj — August 9, 2007 @ 10:05 pm

  2. Great Fix! Works for RSD (Rational Systems Developer) as well, probably because it also uses the Installation Manager.

    Thanks,

    Derek

    Comment by Derek — August 29, 2007 @ 11:28 am

  3. Thank you for your great tip! This shows how rubbish IBM software is. At least I can get back to work now!

    Comment by Imty — February 22, 2008 @ 4:01 am

  4. Holy Smokes thanks. What a complete Pain! This worked for my WDSC (which suddenly changed its splash screen to Rational Software Delivery Platform). I’m fairly new to WebSphere but pretty well familiar with Eclipse.

    I am now using a single directive in my eclipse.ini file:

    -vm
    C:\Program Files\IBM\SDP70\jdk\jre\bin\javaw.exe

    Over the years, I’ve become less and less surprised at how often software can be incompatible with its own self.

    Comment by MXWest — March 21, 2008 @ 3:25 pm

  5. [...] un poco encontre una descripción y solución del problema. La solución es simplemente limpiar el archivo eclipse.ini, iniciar eclipse y luego modificar el [...]

    Pingback by Problemas con eclipse « Dime Jaguar — June 13, 2008 @ 4:34 am

  6. Thank you very much. This works also for the new 3.4 Ganymede.

    Comment by Sandro — June 27, 2008 @ 3:42 pm

  7. [...] completedly blank out the eclipse.ini file [...]

    Pingback by Rien de spécial » Blog Archive » Eclipse. JVM Terminated -1 — August 7, 2008 @ 6:01 am

  8. I think I found out the problem. There is a “new line” character between the option parameter and the option value, and it should be a space only (more details on the retrolink)

    Comment by Regis — August 7, 2008 @ 7:11 am

  9. really very thank full for you solution
    it helped me allot
    it help me to go through the project

    Comment by sandeep — October 7, 2008 @ 6:22 am

  10. Thank you very much for your tips, very usefull.
    I solved my personnal Eclipse problem with your clearly post

    Comment by Badice — December 23, 2008 @ 10:02 am

  11. thanks lots~ problem solve, you are the best

    Comment by SiuKeOnG — January 3, 2009 @ 9:04 am

  12. Thank you so much for your help.
    It works great.

    Comment by RADHESHYAM BOGATI — March 20, 2009 @ 10:34 pm

  13. What a quick fix thanks for that. I am wondering how can the things that i use day in an out change wihout my knowledge. I guess thats what they call Intelligent S/W (which dosnt work )

    Comment by Ankit — August 24, 2009 @ 2:57 pm

  14. This is my eclipse.ini – works fine on 32 bit eclipse on win xp

    -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
    -showsplash
    org.eclipse.platform
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xmx1024m

    HTH

    Ajay

    Comment by Ajay — September 29, 2009 @ 10:21 am

  15. Sometimes I freak out and have to make sure that Jay sends a contract out stat. ,

    Comment by John55 — October 22, 2009 @ 3:07 pm

  16. Thanks for the solution. It worked for me.

    And i could work on my project. Thanks again :)

    Comment by vishakha — January 5, 2011 @ 11:01 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.