Recently I imported a Maven project in Eclipse and changed the build path Library to work on Java 1.7. After that Eclipse shown me error in project, although there was no error shown in any files.

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

The error description was Java compiler level does not match the version of the installed Java project facet.

I also changed the project compiler compliance level to 1.7 but still error was not gone. Below screenshot shows the Problem View where this error was shown.

Eclipse-Java-Project-Facet-Error

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

After some research and looking at the project properties, I was able to fix this issue. All I needed to do was to change the Java Project Facet version from 1.5 to 1.7.

Below screenshot shows the Project properties window where you can set the project facets version.

Eclipse-Java-Project-Facet-Error

Personally I don’t like to change anything in UI, I am more inclined to do things through terminal.

Well, there is a way to do this by editing the project settings for facets.

You will find this in org.eclipse.wst.common.project.facet.core.xml file inside .settings folder at the project root.

The original content of this file was:

I modified it to below.

After refreshing the project, error was gone.

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

If you want to change the compiler compliance level from terminal, you need to edit below properties in org.eclipse.jdt.core.prefs file.

We can change the Library also in .classpath file of the project, but that is not easy and it depends on the name configured for the Library, for example in my project classpath file, entry for JRE looks like below.

I hope it will help someone facing this issue with project facets.

By admin

Leave a Reply