在 Eclipse 中编辑 Java Facet 设置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7802328/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Edit the Java Facet setting in eclipse
提问by rwyland
Some background: I'm getting the dreaded "Java compiler level does not match the version of the installed Java project facet" error in my eclipse project. I'm using Eclipse Helios on OS X Snow Leopard.
一些背景:我在我的 eclipse 项目中遇到可怕的“Java 编译器级别与已安装的 Java 项目方面的版本不匹配”错误。我在 OS X Snow Leopard 上使用 Eclipse Helios。
I'm having trouble editing the java facet settings for eclipse and maven. I've searched around and everywhere says to go to Project Properties -> Project Facet and edit the version there. However for my instance of Eclipse, these settings are not available through the UI.
我在编辑 eclipse 和 maven 的 java facet 设置时遇到问题。我四处搜索,到处都说要转到“项目属性”->“项目构面”并在那里编辑版本。但是,对于我的 Eclipse 实例,这些设置无法通过 UI 使用。
How do I edit the java facet version manually?
如何手动编辑 java facet 版本?
回答by rwyland
Found it in the project under:
在项目下找到它:
/.settings/org.eclipse.wst.common.project.facet.core.xml
/.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.5" />
<installed facet="jst.web" version="2.3" />
<installed facet="wst.jsdt.web" version="1.0" />
</faceted-project>
For me, I had to change the java version 1.5 to 1.6 Thought it would be useful for others since its not well documented.
对我来说,我不得不将 java 版本 1.5 更改为 1.6 认为它对其他人有用,因为它没有很好的文档记录。