ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject CLASSPATH diagnostic tools?
Date Fri, 01 Jun 2001 16:21:45 GMT

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${}"/>
             <path refid="compile.classpath"/> 
	     <path refid="junit.classpath" /> 
             <pathelement location="${build.home}${suffix.test}" />
             <pathelement location="${dist.home}${suffix.lib}${}.jar" />
             <pathelement location="/usr/IBMWebAS/lib/ibmjndi.jar"/>

returns an error of class not found if my classpath is empty.  If my classpath
consists of 


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

View raw message