本帖最后由 杨兴庭 于 2013-7-9 21:13 编辑
在我编译完了,准备执行class文件出现了NoClassDefFoundError异常,具体如下:
E:\java\jdk1.7.0_21\workspace\Bixiangdong\src\网络编程>java UdpReceive
Exception in thread "main" java.lang.NoClassDefFoundError: UdpReceive (wrong name: 网
络编程/UdpReceive)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
我记得毕老师讲过,但我忘了是在哪章讲的,你知道吗?能不能告诉我,或者直接告诉我怎么解决。谢谢 |