本文转自: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解决方法(转)的更多相关文章

  1. Java compiler level does not match解决方法

    从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description  Resource Path Location Type Java compiler level d ...

  2. (转)Java compiler level does not match解决方法

    背景:工作中导入以前的项目,导出报Java compiler level does not match the versionof the installed Java project facet. ...

  3. Java compiler level does not match解决方法, java 修改编译用的jdk的方法

    从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description  Resource Path Location Type Java compiler level d ...

  4. 异常-----Java compiler level does not match解决方法

    1, 先设置好jdk,需要确定 项目,eclipse/myeclipse,系统 用的是同一个版本的JDK,我系统中安装的JDK是1.7,所以我把eclipse的jdk成1.7 2, 进入 window ...

  5. [转]Java compiler level does not match解决方法

    查看链接:http://jingyan.baidu.com/article/95c9d20da3ec5fec4e756186.html

  6. 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 ...

  7. Myeclipse报错-Java compiler level does not match 完美解决方法

    从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description  Resource Path Location Type Java compiler level d ...

  8. 解决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.这个问题,因为当时没 ...

  9. 解决java compiler level does not match the version of the installed java project facet问题

    在编写项目的时候是,后来有改java写法,将工程改成了jdk1.7,后来工程就有了一个红叉,但是代码,文件里没有任何问题,也可以运行,不知道是什么原因,后来在problems里才知道是:java co ...

随机推荐

  1. Android之RAS加密算法测试

    import java.security.Key; import java.security.KeyFactory; import java.security.KeyPair; import java ...

  2. Android之LogUtil

    提供debug与release的时候是否屏蔽打印信息,把信息选择性的进行保存,可以是否自动保存crash的堆栈信息.来自github上的一个开源项目,https://github.com/syxc/L ...

  3. IOS tableview 横向滚动

    1. UITableView 设置 CGRect tableViewRect = CGRectMake(0.0, 0.0, 50.0, 320.0);self.tableView = [[UITabl ...

  4. Sequential projection learning for hashing阅读笔记

    真不能再挖坑了,前面挖聊很多坑都没来得及填,从今往后,能写多少就是多少.Sequential projection learning for hashing这篇文章去年就阅读了,当时阅读完没来得及做笔 ...

  5. python植入后门backdoor程序的方法?

    后门程序 from gevent.backdoor import BackdoorServer server = BackdoorServer((), banner="Hello from ...

  6. MyBatis+Spring SQL效率测试报告

    1. 数据库结构 2. insert 测试 insert 的测试包括 1) 批量拼接values()插入 2) 有事务for循环插入 3) 无事务for循环插入 测试 SQL: <!-- 普通 ...

  7. Word Break leetcode java

    题目: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-se ...

  8. Minimum Window Substring leetcode java

    题目: Given a string S and a string T, find the minimum window in S which will contain all the charact ...

  9. 值得收藏的十二条Jquery随身笔记

    1.关于页面元素的引用 通过jquery的$()引用元素包括通过id.class.元素名以及元素的层级关系及dom或者xpath条件等方法,且返回的对象为jquery对象(集合对象),不能直接调用do ...

  10. Spark性能优化:数据倾斜调优

    前言 继<Spark性能优化:开发调优篇>和<Spark性能优化:资源调优篇>讲解了每个Spark开发人员都必须熟知的开发调优与资源调优之后,本文作为<Spark性能优化 ...