ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Strange classpath behavior
Date Mon, 19 Mar 2001 08:48:21 GMT
Denny Chambers <> wrote:

> I have been fighting with classpath issues between ANT 1.3 and JUnit
> 3.5. If I let Ant build my classpath at runtime to run my JUnit test
> I get the following error listed below. The odd thing is that when
> JUnit echos my classpath it list the junit.jar right there in the
> classpath statement.

Yes, known problem. The task is loaded by the system classloader - and
therefore doesn't use your given classpath to resolve other classes at

The punch line for this is: "if you use a task, that is in your system
classpath - in ANT_HOME/lib/optional.jar for example - and whose
package starts with*, all classes this task
depends upon must be in the system classpath as well."

Two possible solutions for you:

(1) Add JUnit to your system classpath

(2) remove the junit task from optional.jar.


View raw message