Java compiler level does not match the version of the installed Java project facet

后端 未结 12 1665
不知归路
不知归路 2020-12-07 07:19

I have created a New Dynamic Project under Eclipse Helios Version, where my JRE Version is set to 1.6. I have added Maven capabilities to the Web Application by clicking on

12条回答
  •  一整个雨季
    2020-12-07 07:58

    TK Gospodinov answer is correct even for maven projects. Beware: I do use Maven. The pom was correct and still got this issue. I went to "Project Facets" and actually removed the Java selection which was pointing to 1.6 but my project is using 1.7. On the right in the "Runtimes" tab I had to check the jdk1.7 option. Nothing appeared on the left even after I hit "Apply". The issue went away though which is why I still think this answer is important of the specific "Project Facets" related issue. After you hit OK if you come back to "Project Facets" you will notice Java shows up as version 1.7 so you can now select it to make sure the project is "marked" as a Java project. I also needed to right click on the project and select Maven|Update Project.

提交回复
热议问题