Description ResourcePathLocationType Java compiler level does not match the version of the instal
来源:互联网 发布:淘宝宝贝图片下载 编辑:程序博客网 时间:2024/06/03 12:27
Java compiler level does not match解决方法
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet.出现这个问题的原因是因为,eclipse/myeclipse的jdk编译版本与出现问题的项目JDK编译版本不一致所导致!
1、先设置好jdk,需要确定 项目,eclipse/myeclipse,系统 用的是同一个版本的JDK,例如系统中安装的JDK是1.7,所以把eclipse的jdk成1.7
2、进入 windows---proferences---java--compiler设置编译出来的文件使用的格式是 1.7版本的 (设置成多少都行,只要兼容,并且与你项目的编译版本一直就可以,我这里统一设置成1.7)
3、进入项目--properties---java Compiler 把项目编译版本也设置成 1.7
4、进入项目--properties---Myeclipse---project Facets设置java文件的版本为 1.7,并打勾。
5、最后重新导入一下工程文件。
补充说明:
如果重新导入工程后,无法发布deployed,检查工程目录下.setting文件夹内的org.eclipse.wst.common.project.facet.core.xml配置文件
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="com.genuitec.runtime.generic.jee60"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="java"/>
<fixed facet="jst.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="jst.web.jstl" version="1.2.1"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
修改完配置文件,重新导入,重新发布。
相关错误处理:
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的主版本号和次版本号。
- Description ResourcePathLocationType Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path LocationType Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path LocationType Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- DescriptionResourcePathLocationType Java compiler level does not match the version of the instal
- DescriptionResourcePathLocationType Java compiler level does not match the version of the instal
- DescriptionResourcePathLocationType Java compiler level does not match the version of the instal
- Java compiler level does not match the version of the instal
- 计数器-业务的封装
- 本地摄像头
- string字符串若干操作
- ffmpeg学习笔记(1)
- 【活动报名】11Space :和大牛一起聊聊“微信小程序”!
- Description ResourcePathLocationType Java compiler level does not match the version of the instal
- Web安全测试(一)-手工安全测试方法&修改建议
- 焦点与WM_MOUSEWHEEL相关的问题
- 关于C++中的public、private、protected
- 初识JNDI
- Android N 调用相册crash- FileUriExposedException
- if与switch;for和while知识点
- Android 图片上下旋转
- 脚本实现U盘自动挂载(linux)