Bad version number in .class file 错误原因
来源:互联网 发布:java分布式框架有哪些 编辑:程序博客网 时间:2024/04/30 09:19
在用eclipse+myeclipse做Web service实例时,编译总是提示“Bad version number in .class file”,导致执行web service deploy总会提示错误,花了好大劲才知道原因是“Java Compile Level和指定编译的JRE两者间的版本不一致导致'”按以下步骤修改eclipse设置即可恢复正常。
eclisep--preferences--java--Compiler里面的Compiler compilance settings 要选和jdk一样的版本,jdk1.5要选5.0
出现的错误如下: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) 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)This error is reported when someone is trying to deploy war whichcontains java files which have been compiled by jdk version which islower than the jdk version which the tomcat uses.For example wecompiled java files using jdk 1.4 and now we are trying to deploy it intomcat which uses jdk 1.5.
Solution is either make tomcat uses older version of jdk or againcreate java class files using the version that is being used by tomcat.
- Bad version number in .class file 错误原因
- Bad version number in .class file 错误原因
- Bad version number in .class file错误
- eclipse报Bad version number in.class file错误
- 错误: java.lang.UnsupportedClassVersionError: Bad version number in .class file
- 错误:java.lang.UnsupportedClassVersionError: Bad version number in .class file
- Bad version number in .class file(zz)
- 遭遇Bad version number in .class file
- Bad version number in .class file问题
- Bad version number in .class file
- bad version number in .class file异常
- Bad version number in .class file
- Bad version number in .class file
- Bad version number in .class file
- unsupportedclassversionerror bad version number in .class file
- Bad version number in .class file
- Bad version number in .class file异常
- eclipse: Bad version number in .class file
- C语言入门教程之六循环语句和循环控制
- 大型软件公司.net面试题!一定得看(附答案)
- 软件开发应注意的细节(2)_单据的打印
- C语言入门教程之七数组
- 8个常用的cmd网络命令
- Bad version number in .class file 错误原因
- Oracle的在线重定义表功能
- 漫谈ASP.NET设计中的性能优化问题
- C语言入门教程之八多维数组
- PHP Pallas CMS源码公布
- 更改Windows远程桌面端口
- ABAP---如何将内表数据转成HTML格式文件
- Oracle的在线重定义表功能
- 博弈论