ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Simple question about jUnit task forking
Date Tue, 31 Oct 2000 09:45:13 GMT
>>>>> "JC" == Jonathan Carlson <> writes:

 JC> Why will it find the class when I don't fork it, but it won't
 JC> find it when I do fork it?

If you don't fork it, you are running junit in the same VM as
Ant. Ant's junit classes are in ant.jar or optional.jar which are
included by your Ant wrapper script automatically.


(1) Add ant.jar and optional.jar to your CLASSPATH environment

(2) Invoke junit like this

<junit fork="yes">
    <pathelement path="${java.class.path}" />

this will ensure the Ant classes are in your CLASSPATH.

I'd recommend option (2).


View raw message