Browse - Programming Tips - How can I fix: c:\workspace\myproject\build.xml: Unable to find a javac compiler
Q. How can I fix: c:\workspace\myproject\build.xml: Unable to find a javac compiler
The full error is:
c:\workspace\myproject\build.xml:46: 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.
It is currently set to "C:\Program Files\Java\jre7"
A. For me, the error was pretty close to the actual problem.
I needed to change the environment from the JRE to the JDK.
Right click on your build.xml to access its properties.
Add the JDK if its not already there.
Select it as the environment.
Notice, I did NOT add mess with computer's environment variables.