标题: 配置JUNIT出现的问题 [打印本页] 作者: 青柠檬 时间: 2007-2-28 16:15 标题: 配置JUNIT出现的问题 大家好,
偶刚刚学习白盒测试,然后下了个JUINT,但是按照网上说的把junit.jar文件加到classpath后,用javac tang.java命令去编译网上的一个例子,
import junit.framework.TestCase;
public class tang extends TestCase {
public tang (String name) {
super(name);
}
public void testTest() {
assertTrue(true);
}
}
编译就是通不过,报错如下:
tang.java:1: cannot access junit.framework.TestCase
bad class file: D:\junit4.2\junit4.2\junit-4.2.jar(junit/framework/TestCase.c
s)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the clas
th.
import junit.framework.TestCase;
^
1 error
倒入断言包作者: 青柠檬 时间: 2007-3-1 10:51
照楼上的去加了倒入包,但是编译还是报错,好象讲的是我的CLASS文件的版本不对
tang.java:1: cannot access junit.framework.Assert
bad class file: D:\junit4.2\junit4.2\junit-4.2.jar(junit/framework/Assert.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
import junit.framework.Assert;
^
1 error