ant 解决com.sun.tools.javac.Main is not on the classpath的问题

来源:互联网 发布:剑灵刺客捏脸数据导入 编辑:程序博客网 时间:2024/04/27 05:11

ant报错:

   解决com.sun.tools.javac.Main is not on the classpath的问题

  com.sun.tools.javac.Main is not on the classpath.
  Perhaps JAVA_HOME does not point to the JDK.
  It is currently set to "C:\Program Files\Java\jre1.5.0_11"

 

google之后:

遇到这种情况时直接将C:\Program Files\Java\jdk1.5.0_11\lib中的tools.lib拷贝到C:\Program Files\Java\jre1.5.0_11\lib中即可。

原因:

    电脑上有多个JDK版本,或者是编译器JDK版本设置混乱的原因。

原创粉丝点击