JUnit测试报错:Class not found me.gacl.test.MyBatisTest
1.具体报错信息如下:
Class not found me.gacl.test.MyBatisTest
java.lang.ClassNotFoundException: me.gacl.test.MyBatisTest
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:499)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:522)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
2.解决办法:
修改eclipse代码提示级别
Preferences–Java–compiler–building
测试通过
JUnit测试报错:Class not found me.gacl.test.MyBatisTest
最新推荐文章于 2024-06-15 15:10:16 发布