Java compiler level does not match解决方法(转)
本文转自:https://www.cnblogs.com/lauer0246/p/5740572.html#undefined
从别的地方导入一个项目的时候,经常会遇到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的主版本号和次版本号。
Java compiler level does not match解决方法(转)的更多相关文章
- Java compiler level does not match解决方法
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level d ...
- (转)Java compiler level does not match解决方法
背景:工作中导入以前的项目,导出报Java compiler level does not match the versionof the installed Java project facet. ...
- Java compiler level does not match解决方法, java 修改编译用的jdk的方法
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level d ...
- 异常-----Java compiler level does not match解决方法
1, 先设置好jdk,需要确定 项目,eclipse/myeclipse,系统 用的是同一个版本的JDK,我系统中安装的JDK是1.7,所以我把eclipse的jdk成1.7 2, 进入 window ...
- [转]Java compiler level does not match解决方法
查看链接:http://jingyan.baidu.com/article/95c9d20da3ec5fec4e756186.html
- Java compiler level does not match the version of the installed Java project facet.(转)
Java compiler level does not match解决方法 从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource P ...
- Myeclipse报错-Java compiler level does not match 完美解决方法
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level d ...
- 解决Java compiler level does not match the version of the installed Java project facet.问题
其实之前遇到过Java compiler level does not match the version of the installed Java project facet.这个问题,因为当时没 ...
- 解决java compiler level does not match the version of the installed java project facet问题
在编写项目的时候是,后来有改java写法,将工程改成了jdk1.7,后来工程就有了一个红叉,但是代码,文件里没有任何问题,也可以运行,不知道是什么原因,后来在problems里才知道是:java co ...
随机推荐
- struts2 <s:select>标记取包含map的list的值
如下list map.put("ID","001"); map.put ("NM","test1"); list.add ...
- key-value 多线程server的Linux C++实现
项目需求 整体思路 网络通信 字符解析 数据存储与查询 1 存储管理 2 数据查询 多线程 待改进未实现的想法 GitHub源代码 项目需求 设计一个基于Socket或基于HTTP的server,服务 ...
- Pycharm 增加 run 控制台缓冲行数
Yes, you can change the value of idea.cycle.buffer.size in bin/idea.properties under the PyCharm ins ...
- OpenStreetMap地图数据介绍(转)
原文链接:每日一读 Packtpub.OpenStreetMap(1) 相信绝大多数人都知道Wiki,但要提起地图,大家第一反应肯定是Google地图.在没看这本书之前,还真不知原来还有OpenStr ...
- DELPHI中千万别直接使用CreateThread ,建议使用BeginThread(在C++中无大问题,可是到了DELPHI中情况就不一样了)
以前在写个别程序的时候老是喜欢使用纯API编程. 在C++中无大问题,可是到了DELPHI中情况就不一样了. 当你用 DELPHI写的多线程程序莫名其妙的内存错误,特别是字符串(string)操作; ...
- [leetcode]Insertion Sort List @ Python
原题地址:http://oj.leetcode.com/problems/insertion-sort-list/ 题意:对链表进行插入排序. 解题思路:首先来对插入排序有一个直观的认识,来自维基百科 ...
- [转贴] 数字证书及 CA 的扫盲介绍
[略有删节] 为了达到普及的效果,俺会尽量用比较浅显,非技术的语言来讲清楚. ★先说一个通俗的例子 考虑到证书体系的相关知识比较枯燥.晦涩.俺先拿一个通俗的例子来说事儿. ◇普通的介绍信 想必大伙 ...
- Android的硬件抽象层模块编写规范
硬件抽象层模块编写规范 Android系统的硬件抽象层以模块的形式来管理各个硬件訪问接口.每个硬件模块都相应有一个动态链接库文件.这些动态链接库文件的命令须要符合一定的规范.同一时候,在系统内部. ...
- 【翻译自mos文章】CRS显示 正在执行的db instance 是offline状态
CRS显示 正在执行的db instance 是offline状态 转自: CRS shows Running Instance Status as OFFLINE (Doc ID 1673397.1 ...
- [Algorithm] Given the root to a binary tree, return the deepest node
By given a binary tree, and a root node, find the deepest node of this tree. We have way to create n ...