ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peterson, Lance" <lpeter...@verticore.com>
Subject RE: CLASSPATH diagnostic tools?
Date Mon, 04 Jun 2001 15:16:52 GMT
Thanks, Diane.  I typically only run <java> with fork="true".

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Friday, June 01, 2001 6:46 PM
To: ant-user@jakarta.apache.org
Subject: RE: CLASSPATH diagnostic tools?


--- "Peterson, Lance" <lpeterson@verticore.com> wrote:
> Try running ant -verbose, this should print out the actual java command
> line that's being executed.

That's only true if the fork="true" is set -- otherwise, you get logging
output like:

  [java] Running in same VM <classname>

And to the original poster: Setting fork="true" should obviate the need
for you to have the ibmjndi.jar file in your environment CLASSPATH.

Diane

> -----Original Message-----
> From: asr@ufl.edu [mailto:asr@ufl.edu]
> Sent: Friday, June 01, 2001 10:22 AM
> To: ant-user@jakarta.apache.org
> Subject: 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
> 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Mime
View raw message