我正在尝试编译我的SPM项目,然后显示消息说"内存不足"。 所以我的netbeans(8.0)项目保存在Documents,NetBeans Projects Folder中。所以我在那里删除了一些不需要的项目。之后我尝试编译我的项目然后显示了这条错误信息,请给我一个帮助来解决这个问题。整个错误消息如下所示,
java.lang.NoClassDefFoundError: spm_project/Nonacademic
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: spm_project.Nonacademic
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
答案 0 :(得分:4)
对于此错误保持一些重要性: