Java compiler level does not match the version of the installed Java 及MyEclipse中没有ProjectFacets
来源:互联网 发布:必向东java 编辑:程序博客网 时间:2024/06/01 09:53
今天新导入一个工程,报Java compiler level does notmatch the version of the installed Java projectfacet。
一般出现在从别处import的项目上,只有项目文件夹上有红叉,其他地方都正常,现总结个人的几个解决方案:
有几种可能:
1.编码设置是否一致,也即是你项目原来的编码和现在eclipse用的默认编码是否一致
2.导入项目中jar路径可能已经被改变,多数情况下都是这个原因造成,我也曾经遇见过,你要确保你的jar包路径都没问题。myeclipse有查看jar路径的视图你可切换看看,报红X的就都是路径被改动过的,重新加进来就OK。
3.在problem控制台里有如下错误提示:Java compiler level does notmatch the version of the installed Java projectfacet。这种情况一般可以在项目上右键-->properties-->然后找到project facets和 JavaCompiler两个选项,修改其使用的jdk版本即可。
如果没有找到project facets选项,可以参考下面的方法:
MyEclipse中没有ProjectFacets配置选项,则需要到当前项目的.settings文件夹下,找到org.eclipse.wst.common.project.facet.core.xml文件,其内容如下:
<?xml version="1.0"encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java"version="1.6"/>
<installed facet="jst.web"version="2.5"/>
<installed facet="wst.jsdt.web"version="1.0"/>
</faceted-project>
其中<installed facet="java"version="1.6"/>这行就是facetedproject的编译级别配置。<installed facet="jst.web"version="2.5"/>这行配置在某些情况下也需要修改,比如在MyEclipse中建了个web项目,后来又导入到eclipsejee,有时候就需要修改这个配置。
当你安装了两个版本的JDK,用了两个IDE开发工具,比如两个myeclipse,Myeclipse8.5和Myeclipse9.0。
这时候涉及到了jdk版本的问题,而在Myeclipse中设置是比较隐藏的。
Eclipse下有个项目报如上错误,这个是因为Facted Project 中的Java 版本设定与项目的Java版本设定不一致。而如果使用的是MyEclipse的话,这个配置修改起来就不是很方便,具体方法稍后再说。如果是eclipsejee版本,则使用javaee插件是wtp,在wtp环境在,在当前项目上点右键,属性--ProjectFacets中,配置编译版本与java compiler的版本一致,问题即解决了。
保存配置后,刷新并build项目后,问题解决。
- Java compiler level does not match the version of the installed Java 及MyEclipse中没有ProjectFacets
- myeclipse Java compiler level does not match the version of the installed Java...
- myeclipse(java compiler level does not match the version of the installed java project facet)
- GOOD解决MyEclipse工具中java compiler level does not match the version of the installed java project facet
- myeclipse报错: java compiler level does not match the version of the installed java project facet
- myeclipse工程有红叉,里面文件没错,提示Java compiler level does not match the version of the installed Java project
- Java compiler level does not match the version of the installed Java project
- Eclipse 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 fac
- 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 fac
- Error: 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 compiler level does not match the version of the installed Java project fac
- 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
- Angularjs 第五章 读书笔记
- 1159 Palindrome(最少插入回文串)
- Web项目管理工具精选
- VC++ 安装驱动 详细解释
- SQL Server中的Collate排序规则关键字的使用
- Java compiler level does not match the version of the installed Java 及MyEclipse中没有ProjectFacets
- ORA-00936 缺失表达式
- 色纺二十个认同感人的很多人挺好他与和大统华太阳花太费劲
- python inspect模块解析--提供自省功能
- VC++ 安装驱动 源码
- jquery 实现点击加载更多
- rem em px 区别
- 【 Algorithm】顺序打印矩阵——美团四面
- iOS微信开放平台