
vm specified on the command line or in eclipse.iniĮclipse can be started with "-vm " to indicate a virtual machine to use.

If a jvm shared library is found the launcher loads it and uses the JNI invocation API to start the vm.If java is found in either location, then the launcher looks for a jvm shared library (jvm.dll on Windows, libjvm.so on *nix platforms) relative to that java executable. When no -vm is specified, the launcher looks for a virtual machine first in a jre directory in the root of eclipse and then on the search path.

Which method is used depends on how the VM was found. The launcher is still capable of starting the Java VM in a separate process the same as previous version of Eclipse did. The Eclipse launcher is capable of loading the Java VM in the eclipse process using the Java Native Interface Invocation API. I'm writing this because I couldn't figure out how it was still using the old version when it wasn't specified anywhere on the path or eclipse.ini file.įinding a VM and using the JNI Invocation API Like others have stated, the easiest way to deal with this is to specify the specific vm you want to use in the eclipse.ini file. Because it was finding this shared library on my path before the %JAVA_HOME%/bin, it was using the old version. The documentation points out that if no -vm is specified in the ini file, eclipse will search for a shared library jvm.dll This appears in the registry under the key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment that gets installed when using the windows java installer (key might be a bit different based on 64-bit vs 32-bit, but search for jvm.dll). I ran into a similar issue where eclipse was not using my current %JAVA_HOME% that was on the path and was instead using an older version.
