Denny Chambers <[EMAIL PROTECTED]> 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
all.
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 org.apache.tools.ant.*, 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.
Stefan