What does your javac line look like in your build.xml?

On Fri, 9 Jan 2009, robert lazarski wrote:

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-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org



Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

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

Reply via email to