原文地址:http://rogerfederer.iteye.com/blog/737377

 

原因和解决办法如下
出现这个错误是由于你的jdk版本与eclipse高版本配置造成的.
因为我们使用高版本的JDK编译的Java class文件试图在较低版本的JVM上运行,所报的错误。   因为,高版本的JDK生成的class文件使用的格式,可能与低版本的JDK的.class文件格式不同。这样,低版本的JVM无法解释执行这个.class文件,会抛出Could not find the main class.program will exit不支持的Class版本错误。


解决方法
1. 弄清楚该程序是在哪个JDK版本下开发的
2. 在myEclipse 菜单->Windows->Proferences->java-> Installs  Jres重新设置JDK路径,改为开发程序时的JDK版本(我做到这一步就可以了!我的eclipse是7.0,jdk是6u13的。)
3. Windows->Proferences->java->Compiler,将compiler compliance level设置为与上面相同的JDK
 

 

 

 

相关文章:

  • 2021-12-11
  • 2022-01-20
  • 2021-11-16
  • 2021-06-12
  • 2021-09-24
  • 2022-12-23
  • 2021-05-19
猜你喜欢
  • 2021-11-26
  • 2021-09-24
  • 2021-07-01
  • 2021-05-18
  • 2021-09-27
  • 2021-05-24
  • 2021-08-30
相关资源
相似解决方案