Eclipse IDE – Virtual Machine start problem, solved on second attempt

19/11/2011 R Tyler 0 Comments

I installed the recent (1.6) version of the Java development kit to use in the Eclipse IDE. All was going well with the project until I opened the Eclipse environment yesterday and suddenly for no apparent reason it wouldn’t start! An error dialog was given stating: “Failed to create the Java virtual machine.”
eclipse-jvm_error_dialog
I’m pretty new to the Eclipse environment so this was quite a shock to me when it happened. My first thought that my multiple installations of Eclipse in parallel directories was the culprit, but this proved to be a wrong guess! (note to self: “get rid of those additional ‘Eclipse’ installs…. but hang on a minute, will they in fact be needed (one for my Blackberry trials and one for my Android work). Yes, I’m inexperienced in this area, so I’d best get back to the forums on this one… Anyway, checking the current problem in the forums on-line I found 2 possible fixes listed. Only after the second fix was the problem resolved. Here are the steps I carried out to resolve the problem: 1. Configure ‘Eclipse’ to start with java.exe or javaw.exe file (instead of the default jvm.dll startup file). To do this, open the eclipse.ini file (found in the directory on C drive where you installed the ‘Eclipse’ product. In my case this was simple C:\Eclipse). At the appropriate place add the sting ” -vm “ followed with a full path to javaw.exe* on the next line. Note: This didn’t solve the problem, but seems to have done so for many of the reported problem fixes. On further searching I found this second fix. 2. Once again open the eclipse.ini file and locate the default settings line “–launcher.XXMaxPermSize” which is set to a default value of 256m. By removing this value from the file and on saving the ini file, I find that Eclipse operates correcly and “all is well with the machine”. So let me get back to my latest android application (well actually its my first stab at android, I’ve only built for blackberry mobile phones up until now. As a reference for anyone needing the above tips here’s my current C:\Eclipse\eclipse.ini file listing in full:
    -startup
    plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    --launcher.defaultAction
    openFile
    -vm
    C:/Program Files/Java/jdk1.6.0_26/bin/javaw.exe   * - see note above
    -Xms40m
    -Xmx512M
    -XX:MaxPermSize=512m
Google

Leave a Reply: