You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Florian Hopf <ho...@synyx.de> on 2006/07/11 16:49:51 UTC

javac task and JAVA_HOME when calling from Java code

Hi,
I'm executing an ant script from a web application. All tasks I'm using
are working fine, except the javac task. On calling it gives the error
message:

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 and property java.home both point to the base dir of the jdk.

It works fine if I put tools.jar in the WEB-INF/lib dir of my webapp but
due to licensing I would prefer to let the user configure just the path.
Are there any properties that javac uses that I may have missed?

Kind regards
Florian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org