JUnit测试报错:Class not found me.gacl.test.MyBatisTest

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)
JUnit测试报错:Class not found me.gacl.test.MyBatisTest_第1张图片
2.解决办法:
修改eclipse代码提示级别
Preferences–Java–compiler–building
JUnit测试报错:Class not found me.gacl.test.MyBatisTest_第2张图片
测试通过
JUnit测试报错:Class not found me.gacl.test.MyBatisTest_第3张图片

你可能感兴趣的:(JUnit测试报错:Class not found me.gacl.test.MyBatisTest)