I am getting a NoClassDefFoundError
error when I run my program. Here is the stack trace:
我运行程序时收到NoClassDefFoundError错误。这是堆栈跟踪:
Exception in thread "main" java.lang.NoClassDefFoundError: ex7/Ex7
Caused by: java.lang.ClassNotFoundException: ex7.Ex7
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)
Java Result: 1
How do I fix this? I'm on a Mac and running NetBeans.
我该如何解决?我在Mac上运行NetBeans。
1 个解决方案
#1
0
It seems class Ex7
class from package ex7
isn't in classpath. recheck the class try clean build
从包ex7看来,类Ex7class不在classpath中。重新检查班级尝试干净的构建
#1
0
It seems class Ex7
class from package ex7
isn't in classpath. recheck the class try clean build
从包ex7看来,类Ex7class不在classpath中。重新检查班级尝试干净的构建