You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by as...@ufl.edu on 2001/06/01 18:21:45 UTC
CLASSPATH diagnostic tools?
Greetings, all.
I'm having a very frustrating time using ant; I'm getting a wide variety of
"class not found" errors which I -think- I am setting correctly.
However, I can't prove it to myself, because I don't know what command ant is
running when it (for instance) runs java.
What I -do- know is that the following task:
<target name="runtests" depends="compiletests" >
<java classname="junit.textui.TestRunner"
taskname="runtests" failonerror="true" >
<arg value="test${app.name}"/>
<classpath>
<path refid="compile.classpath"/>
<path refid="junit.classpath" />
<pathelement location="${build.home}${suffix.test}" />
<pathelement location="${dist.home}${suffix.lib}${app.name}.jar" />
<pathelement location="/usr/IBMWebAS/lib/ibmjndi.jar"/>
</classpath>
</java>
</target>
returns an error of class not found if my classpath is empty. If my classpath
consists of
/usr/IBMWebAS/lib/ibmjndi.jar
then the test runs.
Note that the noted jar is in the <classpath> stanza of the <java> directive.
When running ant -debug, the <javac> task includes debugging information about
classpaths. Is there a design reason that the <java> task does not?
- Allen S. Rout