码迷,mamicode.com
首页 > 其他好文 > 详细

Could not find main class.

时间:2015-05-19 18:15:59      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:

MyEclipse 导入项目之后 运行“Could not find main class. Program wll exit.”

报错:

bad version number in .class file

 

jdk版本问题

修改成一致

  1. Window --> Preferences -->Java --> compiler中的compiler compliance level对应的下拉菜单中选择JDK版本. 

  2. Window --> Preferences -->MyEclipse --> Servers -->Tomcat --> Tomcat n.x -->JDK中的Tomcat JDK name下的下拉菜单中选择自身电脑上安装的JDK版本(必需与步骤1中的JDK版本一致). 如果还是没有解决,不用焦急,因为有些MyEclipse版本自带有JDK版本,所以也要将它改过来. 
  3. Window --> Preferences -->Java -->Installed JRES,然后在右边选择与步骤1和2版本一致的JDK版本,如果没有,可以自身添加.然后选中就可以了.

 

查了好久,也是笨。

 

我改步骤 1 为6.0

 改步骤 3 为 1.7 也是ok

 

参考:http://jingyan.baidu.com/article/acf728fd21f2e7f8e510a3de.html

Could not find main class.

标签:

原文地址:http://www.cnblogs.com/kami-summer/p/4514846.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!