Ant: Unable To Find A javac Compiler; com.sun.tools.javac.Main

If you just recently deployed Ant into your system and you encounter this error message when you build your application, “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 …”, chances are that you set up the path in your Windows environment incorrectly.

You may have placed the full path of the Java directories instead of making use of the JAVA_HOME environment variable. To fix the problem do this

%JAVA_HOME%\bin

The same goes to your ANT_HOME environment variable

%ANT_HOME%\bin

That should work.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *