score:112

Accepted answer

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

score:-2

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.jee.product
--launcher.defaultaction
openfile
--launcher.xxmaxpermsize
512m
-showsplash
org.eclipse.platform
--launcher.xxmaxpermsize
512m
--launcher.defaultaction
openfile
--launcher.appendvmargs
-vmargs
-dosgi.requiredjavaversion=1.6
-xms2000m
-xmx3512m

score:2

i know that there exists a command line option, -vm, to specify the path to the executable of the java runtime. this may be the same as in eclipse.ini.

score:2

assuming you have a jre folder, which contains bin, lib, etc files copied from a java runtime distribution, in the same folder as eclipse.ini, you can set in your eclilpse.ini

-vm
jre\bin\javaw.exe

score:3

i'd like to share this little hack:

a click on the eclipse's icon indicated a problem with the jre. so, i put this command in the destination field of the icon's properties:

c:\...\eclipse.exe -vm c:\'program files'\java\jdk1.7.0_51\jre\bin\javaw

thinking that the "'" would solve the problem with the space in the path. that did not function. then, i tried this command:

c:\...\eclipse.exe -vm c:\progra~1\java\jdk1.7.0_51\jre\bin\javaw

with success

score:4

the jdk you're pointing to in your eclipse.ini has to match the eclipse installation.

if you are running a 32- or 64-bit eclipse, use a 32 or 64-bit java jdk, respectively.

score:5

you have to edit the eclipse.ini file to have an entry similar to this:

c:\java\jdk\1.5\bin\javaw.exe (your location of java executable)
-vmargs
-xms64m   (based on you memory requirements)
-xmx1028m

also remember that in eclipse.ini, anything meant for eclipse should be before the -vmargs line and anything for jvm should be after the -vmargs line.

score:9

i am not sure if something has changed, but i just tried the other answers regarding entries in "eclipse.ini" for eclipse galileo sr2 (windows xp sr3) and none worked. java is jdk1.6.0_18 and is the default windows install. things improved when i dropped "\javaw.exe" from the path.

also, i can't thank enough the mention that -vm needs to be first line in the ini file. i believe that really helped me out.

thus my eclipse.ini file starts with:

-vm
c:\program files\java\jdk1.6.0_18\bin

fyi, my particular need to specify launching eclipse with a jdk arose from my wanting to work with the m2eclipse plugin.

score:12

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

score:13

-vm

c:\program files\java\jdk1.5.0_06\bin\javaw.exe

remember, no quotes, no matter if your path has spaces (as opposed to command line execution).

see here: find the jre for eclipse

score:24

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.

score:47

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.

score:68

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

Related Query

More Query from same tag