[置顶] JUnit报错:java.lang.ClassNotFoundException: com.mogodb.test.test

复制代码
Class not found com.mogodb.test.test
java.lang.ClassNotFoundException: com.mogodb.test.test
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
复制代码

  查找对应的classes文件夹确实乜有发现响应的class文件生成。

  查看项目确实选择了自动编译!

  上网查找资料,发现了如下的解决办法:

  只要把Java--------compiler-------building-------Buil path problems ------- incomplete build path 和 Circular dependencies改成warning就可以了。

[置顶] JUnit报错:java.lang.ClassNotFoundException: com.mogodb.test.test_第1张图片

[置顶] JUnit报错:java.lang.ClassNotFoundException: com.mogodb.test.test_第2张图片

你可能感兴趣的:([置顶] JUnit报错:java.lang.ClassNotFoundException: com.mogodb.test.test)