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

   

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

博客分类:  Java

在重装了JDk之后,有可能会使Eclipse在编译工程的时候出现如下错误:

 

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"

 

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


如果还是不行,那请配置一下JDK的环境变量,并关闭IDE然后重新打开。

猜你喜欢

转载自blog.csdn.net/qq_31368727/article/details/78458125