Could not find the main class.Program will exit.>myeclipse
求助Could not find the main class.Program will exit.-->myeclipse
我在myeclipse 5.5运行一个任何main方法(jdk1.6):
package my.test;
public class CC {
public static void main(String[] args) {
System.out.println("aaaaaaaaaa");
}
}
弹出个窗口:
Could not find the main class.Program will exit.
控制台输出:
java.lang.NoClassDefFoundError: my/test/CC
Caused by: java.lang.ClassNotFoundException: my.test.CC
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main"
在命令行运行没有错误,如下:
D:\>javac CC.java
D:\>java CC
aaaaaaaaaa
网上找了很多方法没解决,请教大虾怎么解决?困扰我几天了!!!!!!!!!
我的qq:278541473,随时在线,解决加100分!