JDK不兼容异常(class file has wrong version 49.0, should

org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
/usr/tomcat5/work/Catalina/www.neasiaexpo.org.cn/_/org/apache/jsp/sysadmin/event/addmore_005fproject_jsp.java:8: cannot access web.OperateExcel
bad class file: /bak/upload/neasiaexpo/WEB-INF/classes/web/OperateExcel.class
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appea
----------------------------------------------------------------
由于OperateExcel这个类是在JDK1.5的环境下编译的,把他放在JDK1.4环境的服务器下发生以上错误,只要将这个类重新在JDK1.4环境下编译就可以了
 
Eclipse中JDK不兼容异常(class file has wrong version 49.0, should be 48.0)的解决方法
在eclipse 里改变项目的属性设置:[project]->[properties]->[Java Compiler]->选中Enable project specific settings,在JDK Compliance->Compiler compliance level中选1.4(或其它你认为合适的),软件会自动提示需要重新编译,重新编译后运行就ok了。

你可能感兴趣的:(apache,eclipse,jdk,jsp,Web)