您应该将junit.jar添加到ant文件的classpath定义中。
有很多方法可以做到,例如:
<junit printsummary="yes" haltonfailure="yes"> <classpath> <path refid="your.classpath.refid" /> <fileset dir="${junit.dir}"> <include name="**/junit.jar" /> </fileset> </classpath> ...</junit>有关设置类路径的详细信息,请参见Ant手册。



