I had a Java project under Eclipse. Even though all the other errors had been fixed, there was still a bright red X in the bottom-left corner of the project. Checking the Problems view showed only one error:
Java compiler level does not match the version of the installed Java project facet. .. Unknown Faceted Project Problem (Java Version Mismatch)
What does that mean? Literally, a Java version mismatch. The real meaning? No idea—time to ask Google.
Following the clues and searching Google for the source of the error, I quickly found this blog post.
From the article, the root cause is a problem with the configuration of maven. Maven sets the Java compiler and VM versions, but after Java is updated, the Maven project doesn’t keep up, so this error appears.
The fix isn’t hard: locate pom.xml and update the Java version in it.
On Linux, locating the file is just as easy:
find . | grep "pom.xml"The file was found quickly.
Look for something like the following:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>Just change the highlighted part to the current Java version and you’re done.
Comments · 7