当前位置: 代码迷 >> Eclipse >> Could not find the main class.Program will exit.>myeclipse
  详细解决方案

Could not find the main class.Program will exit.>myeclipse

热度:90   发布时间:2016-04-23 13:51:59.0
求助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分!



------解决方案--------------------
同意楼上的说法,看看web-info目录下有没有class文件!
  相关解决方案