Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't my java compiler level match my installed project facet?

I made a simple Java Google AppEngine application called Guestbook in Eclipse 3.7 and am trying to run it. However, I am encountering an error that lacks a quick fix:

Description Resource    Path    Location    Type Java compiler level does not match the version of the installed Java project facet. Guestbook       Unknown Faceted Project Problem (Java Version Mismatch) 

I tried navigating to Project | Properties to change my project facet. However, I could not find a setting that dealt with "facet."

enter image description here

What does "installed Java project facet" mean, and how do I fix this?

like image 855
dangerChihuahua007 Avatar asked Jul 08 '12 22:07

dangerChihuahua007


People also ask

How do I fix Java version mismatch in Eclipse?

Step 1: Uninstall your current version of Java. Step 2: Install a compatible version of Java. Compatible versions include: 1.8. 0.162, 1.8.

How do I change Java version to an existing project?

Click on the Window tab in Eclipse, go to Preferences and when that window comes up, go to Java → Installed JREs → Execution Environment and choose JavaSE-1.5. You then have to go to Compiler and set the Compiler compliance level.

What is Java project facet?

Facets define characteristics and requirements for Java™ EE projects and are used as part of the runtime configuration. When you add a facet to a project, that project is configured to perform a certain task, fulfill certain requirements, or have certain characteristics.


2 Answers

You can see your facets via Right click on your project->properties->Project Facets,

Here you can see my facets for an example web application: here

I think your Java facet does not match with the installed one. I'm suspicious that facet is at version 1.5. Please check it.

Add-on:Open the Navigator view, expand the .settings folder, open the file org.eclipse.wst.common.project.facet.core.xml and manually set the Java version to 1.6.

like image 178
GokcenG Avatar answered Sep 21 '22 13:09

GokcenG


Right click on your project->properties->Project Facets,

This will show your current version of java for your project facet.

In my case I had the correct version for my facet but not my compiler, So had to right click on project->properties->Java Compiler

Then under Compiler compliance level drop list and change to version of project facet.

like image 30
java traniee Avatar answered Sep 17 '22 13:09

java traniee