mevan中诡异的java.lang.NoClassDefFoundError

在包含main方法的类上右键Run as -> Java Application出现如下错误:

java.lang.NoClassDefFoundError: SpyMemcacheTest
Caused by: java.lang.ClassNotFoundException: SpyMemcacheTest
	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:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Exception in thread "main" 

 原因是mevan默认的output folder为target/classes,如图设置一下就OK了


mevan中诡异的java.lang.NoClassDefFoundError
 

你可能感兴趣的:(mevan中诡异的java.lang.NoClassDefFoundError)