This doesn\'t work -vm %JAVA_HOME%/bin/javaw.exe
How can I replace %JAVA_HOME% with full path on windows 8 when path contains space (\"program files\" directory)
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.
-vm
C:/PROGRA~1/Java/jdk1.8.0_40/bin/javaw.exe
I realized what was going on after running this in cmd.exe
CD \
DIR P* /X
It returned...
PROGRA~1 Program Files
PROGRA~2 Program Files (x86)
So we can find out how to use a path containing spaces