How to change JAVA.HOME for Eclipse/ANT

前端 未结 10 1920
星月不相逢
星月不相逢 2020-12-04 17:36

I am trying to sign a jar file using an ANT script. I know this has to be pointed at the JDK directory for jarsigner.exe to run, but when I echo java.home it re

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 18:20

    Under Windows you need to follow:

    Start -> Control Panel -> System -> Advanced -> Environment Variables.

    ... and you need to set JAVA_HOME (which is distinct from the PATH variable you mention) to reference the JDK home directory, not the bin sub-directory; e.g. "C:\program files\java\jdk".

提交回复
热议问题