Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ant error: unable to find a javac compiler

843810Sep 22 2004 — edited May 19 2009
I was using ant 1.5 with no problems until recently...then upgraded to 1.6 and had all sorts of problems so have gone back to 1.5. Now I get the 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


(JAVA_HOME is correct) when trying to compile anything. I've read a ton of posts about this, all of which say to copy tools.jar into $ANT_HOME/lib - I've done that and still got the problem. Any ideas?

TIA
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2009
Added on Sep 22 2004
48 comments
3,891 views