在eclipse中编辑Java Facet设置 [英] Edit the Java Facet setting in eclipse

查看:143
本文介绍了在eclipse中编辑Java Facet设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些背景:我的eclipse项目中出现了可怕的Java编译器级别与安装的Java项目构面的版本不匹配错误。我在OS X Snow Leopard上使用Eclipse Helios。



我无法编辑eclipse和maven的java facet设置。我已经搜索到,到处都说要去项目属性 - >项目方面,并在那里编辑版本。但是对于我的Eclipse实例,这些设置不能通过UI使用。



如何手动编辑java facet版本?

解决方案

在项目中找到它:



/。settings / org.eclipse.wst.common。 project.facet.core.xml

 <?xml version =1.0encoding =UTF-8?> 
< faceted-project>
< fixed facet =wst.jsdt.web/>
< installed facet =javaversion =1.5/>
< installed facet =jst.webversion =2.3/>
< installed facet =wst.jsdt.webversion =1.0/>
< / faceted-project>

对于我来说,我不得不将java版本1.5更改为1.6
想到这将是对其他人有用,因为它没有很好的记录。


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.

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.

How do I edit the java facet version manually?

解决方案

Found it in the project under:

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

这篇关于在eclipse中编辑Java Facet设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆