You can either

1) put junit.jar in %ANT_HOME%\lib
2) add it to the classpath when invoking Ant
3) leave jnuint.jar where it is and move Ant's optional.jar out of
%ANT_HOME%\lib and specify the path to both junit.jar and optional.jar in
the taskdef for the Junit task.


William

> -----Original Message-----
> From: Bryan P. Glennon [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 11 December 2001 9:18
> To: [EMAIL PROTECTED]
> Subject: JUnit optional task
>
>
> When I try to use the Junit task (with ant 1.4.1, Junit 3.7 and
> jdk1.2.2) I get the following error:
>
> Could not create task of type: junit. Common solutions are to use
> taskdef to declare your task, or, if this is an optional task, to put
> the optional.jar in the lib directory of your ant installation
> (ANT_HOME).
>
> Well, optional.jar is in the ANT_HOME/lib dir (as is
> jakarta-ant-1.4.1-optional.jar.) Actually, optional.jar is just a copy
> of jakarta-ant-1.4.1-optional.jar.
>
> So, what am I doing wrong?
>
> Thanks,
> Bryan
> --
> Bryan Glennon (mailto:[EMAIL PROTECTED])
> BPG Consulting, Inc. (http://www.bpgc.com)
> Tech Question? (mailto:[EMAIL PROTECTED])
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to