Unable to find a javac compiler com.sun.tools.javac.Main is not on the classpath error
问题 I am trying to run java application and I am getting following error, 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 I have gone through many SO questions and found solution is JAVA_HOME should be point to JDK, not JRE . Then I have tried to print JAVA_HOME in command prompt, I had set this JAVA_HOME from my computer->properties->env variables -> system vars as below, I had also added new variable in eclipse using