找不到测试类
java.lang.ClassNotFoundException: org.seckill.dao.SeckillDaoTest这个错误怎么回事,为什么会找不到类呢
java.lang.ClassNotFoundException: org.seckill.dao.SeckillDaoTest这个错误怎么回事,为什么会找不到类呢
2016-12-01
打开工程的.classpath文件:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/config"/>
<classpathentry kind="src" path="src/test/java"/>
.......
</classpath
将output="target/test-classes"加上就好用了
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/config"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
举报