Why does ANT tell me that JAVA_HOME is wrong when it is not?

后端 未结 24 1047
北恋
北恋 2020-12-07 16:49

I get the error:

C:\\dev\\ws\\springapp\\build.xml:81: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not

24条回答
  •  广开言路
    2020-12-07 17:01

    Set JAVA_HOME in the environment variables as D:\Program Files\IBM\SDP\jdk Do not give any quotes or semicolon. It's works for me.Please try the solution. Actually in ant.bat it checks for appropriate JAVA_HOME in case if ant.bat not able to find it then it's JAVA_HOME points the default JRE.

提交回复
热议问题