ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <robertlazar...@gmail.com>
Subject Can't find tools.jar when invoking ant programatically
Date Fri, 09 Jan 2009 18:17:42 GMT
Hi all,

I'm running ant 1.7.0 with jdk1.6.0_11 on linux. I have the jdk, and
not the jre. However, I get this error when invoking ant
programatically, via
"project.executeTarget(project.getDefaultTarget())" and the like.
Here's my error:

/programs/atadapter/oa/openAdapter/ati.build.xml:49: 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 "/usr/local/jdk1.6.0_11/jre"

Actually, my JAVA_HOME is set as:

/root> echo $JAVA_HOME
/usr/local/jdk1.6.0_11

I know I have a jdk since I choose to downloaded that and not the jre,
but anyways, I can do this:

 /root> which javac
/usr/local/jdk1.6.0_11/bin/javac

I tried adding /usr/local/jdk1.6.0_11/lib/tools.jar to the build.xml
files path as:

<path id="oa.classpath">
     <fileset dir="/usr/local/jdk1.6.0_11/lib/">
        <include name="tools.jar"/>
     </fileset>
 </path>

But that didn't help either. Any ideas?
Robert

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


Mime
View raw message