Perhaps JAVA_HOME does not point to the JDK

Unable to find a javac compiler;  com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

 

解决方法:在Eclipse中Window->Preferences,找到Tomcat下的JVM Settings在ClassPath下添加

%JDK_HOMe% lib/dt.jar和%JDK_HOMe% lib/tools.jar

重新启动Tomcat即可。

你可能感兴趣的:(java,eclipse,jvm,jdk,tomcat,compiler)