我试图使用Ant编译JUnit的java文件,但我正在逐渐,蚂蚁junit的参考
package org.junit does not exist
[javac] import static org.junit.Assert.*;
...
而且,这是我的build.xml的一部分,
<javac debug="true" includeantruntime="false" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="test"/>
<classpath refid="MyProgram.classpath"/>
</javac>
<path id="MyProgram.classpath">
...
<pathelement location="lib/junit.jar"/>
...
是这有什么问题吗?
谢谢。
你肯定'junit.jar'是真的位于'lib'目录? – AlexR
是的,jar文件在lib文件夹下。 – Tony
你的junit.jar可能是junit3吗? 'org.junit.Assert'包是junit4,我看到junit3把它作为'junit.framework.Assert'包。 –