Accepted answer

have you tried it. don't put everything in single line.

c:\program files\java\jdk1.6.0_07\bin\

need to put the folder that contains the javaw or java executable. under ubuntu 18 with eclipse 4.7.1 i was able to get it to run with:


if it doesn't work then please confirm you have added above lines before -vmargs in eclipse.ini.


reinstall java and choose a destination folder without a space


-vm c:\program files\java\jdk1.6.0_07\bin\javaw.exe


try to escape the space with back slash.. like

c:\program\folder\ \name\java\jdk\bin


go to c drive root in cmd type dir /x this will list down the directories name with ~.use that instead of program files in your jdk path


sometimes spaces in path create a problem. you can add e.g. -vm c:\progra~1\java\jre1.8.0_112\bin\javaw.exe


windows-vm "c:\program files\java\jdk1.6.0_07\jre\bin\javaw.exe"


i have windows 8.1 and my jdk under "program files" as well. what worked for me was replacing the name of the folder by the 8-digit internal ms-dos name.


i realized what was going on after running this in cmd.exe

cd \
dir p* /x

it returned...

<dir>          progra~1     program files
<dir>          progra~2     program files (x86)

so we can find out how to use a path containing spaces


even if your %java_home% contains spaces, you can directly put entire string over there.

c:\program files (x86)\java\jdk1.8.0_162\bin

also, you don't have to specify javaw.exe in the path, just mention it till bin it will find javaw.exe in bin folder by itself. just keep one thing in mind that the jdk version you provide should match with the eclipse version you are using.

if you are using a 64 bit java then download 64 bit eclipse. if you are using a 32 bit java then download 32 bit eclipse.


solution in:how do i set the eclipse.ini -vm option?

-vm c:\\bin


must be the first thing in eclipse.ini


all above answers didn't work for me. my eclipse mars is x64 but i need to set registry dll to x86 for another software.

at the end i put -vm argument at the end of shortcut and this did the trick.

d:\mars\eclipse\eclipse.exe -vm "c:\program files\java\jre7\bin\server\jvm.dll"

according to this doc jvm.dll also work for some cases.


if you are using mac, proceed with following steps:

  1. move to following directory:

  2. add the java home explicitly in sts.ini file:


make sure not to add all the statements in single line


i was facing the same issue but was unable to solve, until i try this:

  1. please make sure you put -vm
  2. then press enter
  3. and then paste c:\program files\java\jdk1.6.0_07\bin\javaw.exe



the -vm option must occur after the other eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option, since everything after -vmargs is passed directly to the jvm. add the -vm option on its own line and the path to your jdk executable on the following line; e.g.

c:\program files\java\jdk1.8.0_161\bin\javaw.exe



  • the path is on a new line below the -vm option
  • there is no need to escape any characters or use slashes (back-slashes are fine)
  • the path points to the bin directory, not to javaw.exe

gotcha java_home

when you don't specify a virtual machine in your eclipse.ini file, you may think that the java_home environment variable is used, but this is not the case!
from faq_how_do_i_run_eclipse#find_the_jvm

eclipse does not consult the java_home environment variable.

instead the windows search path will be scanned.

you may think it is a good idea to use the search path, because it is flexible.
while this is true, it also has the downside that the search path may be altered by installing or updating programs.
thus, i recommend to use the explicit setting in the eclipse.ini file.

finding a vm

the reason why you should specify the bin directory and not the javaw.exe (as proposed by many other answers), is that the launcher can then dynamically choose which is the best way to start the jvm. see details of the launcher process for all details:

we look in that directory for: (1) a file, (2) a java launcher or (3) the jvm shared library.


you can verify which vm is used by your running eclipse instance in the configuration dialogue.
in eclipse oxygen go to help - about eclipse - installation details - configuration

you will see which vm path eclipse has chosen, e.g.:

eclipse.vm=c:\program files\java\jdk1.8.0_161\bin\..\jre\bin\server\jvm.dll


add the entry of vm above the vm args else it will not work..! i.e `

    c:\program files\java\jdk1.7.0_75\bin\javaw.exe

Related Query

More Query from same tag