How to specify jdk path in eclipse.ini on windows 8 when path contains space

后端 未结 14 861
时光取名叫无心
时光取名叫无心 2020-12-08 08:56

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)

14条回答
  •  醉梦人生
    2020-12-08 09:27

    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

提交回复
热议问题