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

后端 未结 24 1019
北恋
北恋 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:14

    I hope you are aware about System and User environmental variables. The user ones are preferred over system. If you have set your JAVA_HOME in system variables and if there is an entry for the same in user variables, then you will get the latter one only.

    Right click on My computer, Go to properties, Select Advanced tab and click on Environmental variables to see the list of user and system environment variables.

提交回复
热议问题