Contents

Oracle/Sun VM 1.6.0_21 on Windows

The Eclipse 3.3 - 3.6 launchers for Windows had a problem with the Oracle/Sun Java VM version '1.6.0_21-b06'.

UPDATE: Oracle/Sun have released a respin of their JDK/JRE to fix this, so the recommended resolution of this problem is to download and re-install version 1.6.0_21-b07' or higher from http://www.java.com (alternative link is http://java.sun.com/javase/downloads/index.jsp). Make sure you have b07 or higher by running java -version.

Before the fix was released, there were three choices to work around this:

switch back to '1.6.0_20' (as of July 19, 2010 it can still be downloaded here)

You can start Eclipse by running eclipse.exe on Windows or eclipse on other platforms. This small launcher essentially finds and loads the JVM. On Windows, the eclipsec.exe console executable can be used for improved command line behavior.

Alternatively, you can launch Eclipse by directly invoking the JVM as follows:

NOTE: The version of org.eclipse.equinox.launcher in the above command must match the version actually shipped with Eclipse. For more details on launching Eclipse using Java (not eclipse.exe) with the launcher, see Starting Eclipse Commandline With Equinox Launcher.

Find the JVM

If a JVM is installed in the eclipse/jre directory, Eclipse will use it; otherwise the launcher will consult the eclipse.ini file and the system path variable. Eclipse DOES NOT consult the JAVA_HOME environment variable.

To explicitly specify a JVM of your choice, you can use the -vm command line argument:

eclipse.ini

The most recommended way to specify a JVM for Eclipse to run in is to put startup configuration into the Eclipse.ini file in the same folder as the Eclipse executable (eclipse.exe on Windows). The Eclipse program launcher will read arguments from either the command-line or the configuration file named Eclipse.ini. To specify a JVM using configuration file, include the -vm argument in Eclipse.ini, for example:

-vm
c:/jre/bin/javaw.exe

Note: there are no quotes around this path as would be required when executing the same from the command-line were the path to contain white space, etc. This is a common mistake when using Windows.

Eclipse now will launch without additional arguments in the command-line, with the JVM specified in the Eclipse.ini configuration file.

You should always use -vm so you can be sure of what VM you are using. Installers for other applications sometimes modify the system path variable, thus changing the VM used to launch Eclipse without your knowing about it.

The format of the eclipse.ini file is very particular; it is strongly recommended to read Eclipse.ini and folow the examples there.

When Eclipse starts, you are prompted to choose a workspace location on start-up. This behavior can be configured in the Preferences. You can manually specify the workspace location on the command line, using the -data <workspace-path> command-line argument.

OLD: Starting Eclipse 3.2

In Eclipse 3.2 and earlier, there was an additional file in the root of Eclipse: startup.jar. This jar file contained the classes needed to start the platform. In 3.3 and above the equivalent classes are in the org.eclipse.equinox.launcher bundle.

User Comments

The -data option does not work if a relative path is specified. If this is true, please point it out the FAQ above. Thank you.

Specifying -vm "c:\program files\..." seems to work for galileo.

A comment on the JVM search order (on Windows) - My testing (Windows 7, Eclipse 3.4.1) shows that Eclipse also looks for a JVM in the registry, in my case HKLM\Software\Wow6432Node\JavaSoft\Java Runtime Environment. I believe the correct search order would be 1: eclipse/jre directory, 2: eclipse.ini file, 3: registry, 4: System path variable. Can anyone else confirm this? If that is the case I think the text above should be updated.