reset password
Author Message
zhasan76
Posts: 17
Posted 09:54 Oct 21, 2010 |

I am getting the following error after  delete everything under /build/classes .

"C:\CsDevlopment\Project\csns\build.xml:102: 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 (x86)\Java\jre6"

 

I delete the project and checkout again  then it works.

When I delete again FileTest.class from  /build/classes  getting the same error.

any help ??

 

cysun
Posts: 2935
Posted 11:56 Oct 21, 2010 |

Your JAVA_HOME should point to the JDK folder, not the JRE folder. JRE does not include the Java compiler (i.e. javac), only the Java runtime (i.e. java), and that's why you got an error from Ant.

You didn't get the error before you delete everything under build/classes because the classes in that folder are compiled by Eclipse, which uses its own Java compiler (unless you specify otherwise).