How to change JAVA.HOME for Eclipse/ANT

前端 未结 10 1898
星月不相逢
星月不相逢 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:31

    Also be sure to set your JAVA_HOME environment variable. In fact, I usually set the JAVA_HOME, then prepend the string "%JAVA_HOME%\bin" to the system's PATH environment variable so that if Java ever gets upgraded or changed, only the JAVA_HOME variable will need to be changed.

    And make sure that you close any command prompt windows or open applications that may read your environment variables, as changes to environment variables are normally not noticed until an application is re-launched.

提交回复
热议问题