How do I set the eclipse.ini -vm option?

193,899

Solution 1

My solution is:

-vm
D:/work/Java/jdk1.6.0_13/bin/javaw.exe
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-framework
plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

Solution 2

eclipse.ini file must have -vm on the first line and a path on the second line. Don't try to put everything into one line!

-vm
C:\Program Files\Java\jdk1.6.0_07\bin\javaw.exe

Solution 3

Anything after the "vmargs" is taken to be vm arguments. Just make sure it's before that, which is the last piece in eclipse.ini.

Solution 4

There is a wiki page here.

There are two ways the JVM can be started: by forking it in a separate process from the Eclipse launcher, or by loading it in-process using the JNI invocation API.

If you specify -vm with a path to the actual java(w).exe, then the JVM will be forked in a separate process. You can also specify -vm with a path to the jvm.dll so that the JVM is loaded in the same process:

-vm
D:/work/Java/jdk1.6.0_13/jre/bin/client/jvm.dll

You can also specify the path to the jre/bin folder itself.

Note also, the general format of the eclipse.ini is each argument on a separate line. It won't work if you put the "-vm" and the path on the same line.

Solution 5

My solution for Ubuntu Linux:

-vm
/home/daniel/Downloads/jdk1.6.0_17/bin
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.2.R36x_v20101019_1345
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
Share:
193,899
cometta
Author by

cometta

Updated on December 12, 2020

Comments

  • cometta
    cometta over 3 years

    I installed the Maven plugin for Eclipse, and then I got an error like below:

    please make sure the -vm option in eclipse.ini is pointing to a JDK

    How do I use the -vm option to point to my JDK in eclipse.ini?