当前位置: 技术问答>java相关
我昨天刚学java用的是JBuilder可是我用F9运行之后在classes目录中生成的.class文件为什么我在用java.exe application1时出现如下的错误呢
来源: 互联网 发布时间:2015-04-08
本文导语: E:personalMyProgramprojectclassesproject>java application1 Exception in thread "main" java.lang.NoClassDefFoundError: application1 (wrong name: project/Application1) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoad...
E:personalMyProgramprojectclassesproject>java application1
Exception in thread "main" java.lang.NoClassDefFoundError: application1 (wrong name: project/Application1)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
请各位帮忙指点一下.
Exception in thread "main" java.lang.NoClassDefFoundError: application1 (wrong name: project/Application1)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
请各位帮忙指点一下.
|
装JB6不用设什么。
E:personalMyProgramprojectclassesproject> java application1应该改为:
E:personalMyProgramprojectclassesjava project.application1
E:personalMyProgramprojectclassesproject> java application1应该改为:
E:personalMyProgramprojectclassesjava project.application1
|
CLASSPATH没有设置好!
SET CLASSPAHT=.;c:jdk1.3libtools.jar;
SET CLASSPAHT=.;c:jdk1.3libtools.jar;