Edit the Java Facet setting in eclipse

送分小仙女□ 提交于 2019-12-03 12:28:02

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/7802328/edit-the-java-facet-setting-in-eclipse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!