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