当前位置: 代码迷 >> Ruby/Rails >> 转:tomcat 启动异常 java.lang.UnsupportedClassVersionError: Bad version number in .cla
  详细解决方案

转:tomcat 启动异常 java.lang.UnsupportedClassVersionError: Bad version number in .cla

热度:189   发布时间:2016-04-29 02:21:11.0
转:tomcat 启动错误 java.lang.UnsupportedClassVersionError: Bad version number in .cla

转载地址:http://zgqhyh.iteye.com/blog/530873

?

tomcat 启动错误 java.lang.UnsupportedClassVersionError: Bad version number in .class file

如果你是使用myeclipse进行开发,一般都通过myeclipse配置过tomcat,这样开发特别方便,因为myeclipse自动布署。
一般情况你都不会遇到我下面所说的问题,但是,如果你很不幸的遇到此问题了,那么恭喜你在这里找到了解决方案。其实很简单:?

    java.lang.UnsupportedClassVersionError: Bad version number in .class file  

?如果你myeclipse的开发环境使用的jdk版本比较新,那么在myeclipse中配置tomcat时,对应的也要设置上相应的jdk,如 果你tomcat的默认jdk版本低了,那么就会报错java.lang.UnsupportedClassVersionError: Bad version number in .class file。
知道了问题原因,解决就很简单了,在myeclipse中配置服务器地方,将tomcat的jdk版本设置为与开发环境的jdk版本相同即可,或者配置版本理高点的jdk

  相关解决方案