我使用的是Eclipse-jee-indigo + JDK 1.6.23环境,结果使用时出现Unsupported major.minor version 51.0错误提示,下面我来介绍Unsupported major.minor version 51.0错误的解决办法
今天偶然间同事遇到一个问题,也加深了自己对eclipse中build path和java compiler compliance level的理解。
解决Unsupported major.minor version 51.0错误
最近新安装使用了jdk7,编译了一些类替换到原来正常运行的项目中,替换之后发生了Unsupported major.minor version 51.0错误。经过网上搜索发现了问题产生的原因:用jdk7编译的class文件放到基于jdk6运行在tomcat之中,就会报这个错。
解决起来也很方便:打开exclipse中项目上的属性—java compiler–选择一个合适的版本后重新编译即可。
具体步骤
解决:项目------>右键------>属性------>Java Compiler------>Compiler Compliance Level------>选择你使用的JDK版本------>应用。
总结:不同的JDK版本使用的major.minor不同,所以会导致这个错误。在项目中要使用当前电脑配置的JDK版本,切忌张冠李戴。
知识扩充:major.minor version,它相当于一个软件的主次版本号,只是在这里是标识的一个Java Class的主版本号和次版本号。
相关推荐
Major version increments with each card supported. Minor version increments with each new feature. Sub-minor version increments when an existing feature changes.
yar-java-client, Java client for laruence’s yar, concurrent async request supported.
EEMD family, Matlab version. PARFOR supported.zip
JSR-75-135-172_Supported List 主流手机对JSR 75 135 172的支持!
OpenCore Configurator [OpenCore 0.7.0 supported Version 2.40.0.1]
解决部分视频不能播放并提示,File is unplayable. Color space is not supported.文件无法播放。不支持颜色空间。
WebComponents.exe,官方控件,浏览器安装后 ,重启浏览器即可
对简支梁进行损伤识别的代码,有多种算法和完整程序注释
r40m备份42验OV5640_BPI-M2U_验证通过除了RJ45之外_20171115_1836没有外层目录.7z sun8iw11p1_android_m2ultra_uart42验证通过patch42.7z ...BPI-M2U(2017/11/18 16:49): 0、LCD+CTP默认正常 ...**_HDMI-Version_**
强壮的基于服务器支持的签名认证的电子邮件系统的安全性分析,郭丽峰,,通过认证的电子邮件是标准的电子邮件系统中的增值服务, 它允许发送方以公平的方式将消息传递给接受方。在这个意义上,或者发送��
ERROR:ABIs [armeabi] are not supported for platform.Supported ABIs are [arm64-v8a, armeabi-v7的完美解决方案-附件资源
Office安装错误Per-user install not supported.txt
解决SVN上传提示Empty directoriesis not supported 解决SVN上传提示Empty directoriesis not supported
NULL 博文链接:https://lectery.iteye.com/blog/485357
PowerVR.Supported+Extensions.OpenGL+ES.EGL.pdf opengl 扩展
IDEA中的.VUE文件报错 Export declarations are not supported by current JavaScript version 和Export declarations are not supported by current JavaScript version报错都是一个解决办法 js文件报错 第一步,...
django 设置settings.py,本文以mysql 为例,说明怎样配置mysql d的连接
Vocational rehabilitation and supported employment. Baltimore: Brookes Publishing, 372 pp., [dollar]43.00 Book Reviews 293 talented educators live largely on impulse, personal judgment, and ...