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 ...
随机推荐
- 《Windows核心编程》第九章——用内核对象进行线程同步
先举一个有bug的例子: #include <iostream> #include <windows.h> #include <process.h> using n ...
- JAVA常见算法题(三十四)---计算加密之后的电话号码
某个公司采用公用电话传递数据,数据是四位的整数,在传递过程中是加密的, 加密规则如下: 每位数字都加上5,然后用和除以10的余数代替该数字, 再将第一位和第四位交换,第二位和第三位交换. 求加密之后的 ...
- scala编程第17章学习笔记(3)
可变(mutable)集合与不可变(immutable)集合 为了更易于完成不可变集合到可变集合的转换,或者反向转换,Scala提供了一些语法糖.纵使不可变集和映射并不支持真正的+=方法,Scala还 ...
- IDEA热部署基于maven的web项目
第一步:首先先创建web项目 按照向导一步一步完成项目创建,我创建的示例项目为hotdeploddemo 第二步:设置项目的web资源 下图中的路径要修改正确,指向src/ma ...
- iOS开发-UI基础Demo
现在更多的学习资料都是xCode4.X的,发现xCode6.1还是很多东西,如果有正在学习iOS开发的可以通过Demo简单了解下iOS的UI开发~ 1.新建单视图文件: 2.新建项目名称,语言选择OC ...
- [Web前端]由cookies安全说开去
在Web应用中,Cookie很容易成为安全问题的一部分.从以往的经验来看,对Cookie在开发过程中的使用,很多开发团队并没有形成共识或者一定的 规范,这也使得很多应用中的Cookie成为潜在的易受攻 ...
- fatal error C1853: '<filename>' is not a precompiled header file
当编译c和c++混合的项目时,会出现如下类似的错误 fatal error C1853: '<filename>' is not a precompiled header file 解决方 ...
- (C++)i++和++i,哪个效率高一些
在看<程序员面试笔试宝典>时,发现了这样一个问题,书中只给出了++i的效率高一些,但并没有给出具体的解释和说明. 在网上找到下面的答案: 1.从高级层面上解释 ++i 是i=i+1,表达式 ...
- (LeetCode 189)Rotate Array
Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array ...
- (LeetCode 86)Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes gr ...