问题描述:

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)

网友答案:

Have you tried it. Don't put everything in single line.

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

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

网友答案:

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

    -vm
    C:\Program Files\Java\jdk1.7.0_75\bin\javaw.exe
    --launcher.appendVmargs
    -vmargs
    -Dosgi.requiredJavaVersion=1.6
    -Xms40m
    -Xmx512m
网友答案:

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

-vm C:\\bin\javaw.exe

 -vm
C:\<java_path>\bin\javaw.exe

Must be in the first thing in eclipse.ini

网友答案:

Try to escape the space with back slash.. Like

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

网友答案:

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.

-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...

<DIR>          PROGRA~1     Program Files
<DIR>          PROGRA~2     Program Files (x86)

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

网友答案:

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.

网友答案:

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

网友答案:

Reinstall java and choose a destination folder without a space

相关阅读:
Top