ant 手动打包报错: com.sun.tools.javac.Main is not on the classpPerhaps JAVA_HOME does not point to the JDK

ant手动打包报错:

        javac compiler; 
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\jre7"

    网上教程都是说在eclipse 配置.  但是我是打包成jar后通过ant运行的. 

     解决办法:  把jdk/lib/tools.jar 拷贝到jre7\lib\ext即可.

        

你可能感兴趣的:(java,jdk,ant,compiler)