34

I am using up-to-date Eclipse Luna which should be ready for Java 8. However when I choose to create a new server with Tomcat 7 and click Next, in the Add and Remove screen I can't move my project because "Project facet Java version 1.8 is not supported." What is the problem and how can I fix this?

7 Answers 7

53

I solved the problem. Go to Project Properties -> Project Facets -> Runtime -> New -> Add a tomcat server and in JRE select JRE1.8.0_XX.

Did the work for me

2
  • Thanks for the response! I solved my problem by upgrading to Tomcat 8 and doing that.
    – Orin
    Mar 26, 2015 at 20:27
  • That was helpful. Thanks. To just elaborate a bit: Right Click on the Project => select Properties => Project Facets => On the Project Facets dialogue box click the drop down arrow on the Version column and change the Java version to 1.8 then hit "Apply and Close" button. Re-run the server and the error should be gone by this time.
    – Tes
    Nov 1, 2022 at 19:18
36

In eclipse you can change the java version from your tomcat, see picture:

enter image description here

1
  • @skynafo Good morning, Thanks! :-)
    – adhg
    Jun 30, 2016 at 13:17
14

That is because you just changed your JRE location in the workspace property, which TOMCAT relies on.

Please reset your tomcat property accordingly again:

windows -> preference -> server -> Runtime Environments. To the right of Runtime Environments, you should see the servers. Remove Tomcat 8.0 and add Tomcat v9.0. Rebuild project. 

You can remove and create it again, or just update it.

11

It is because Java version in your Project Facet is 1.8 make it 1.7. Go to Project Properties -> Project Facets and on right side checkboxes, select java checkbox(It might be already selected) and select the version as 1.7 from dropdown.

2
  • This is actually the "correct" solution in most cases. Kudos!
    – paulsm4
    Oct 5, 2016 at 19:51
  • Thanks! That worked for me on Eclipse Oxygen. Nov 3, 2021 at 23:12
2

Window Menu -> Preferences On the left, expand the Server and click Runtime Environments Edit Server Runtime Environment. Choose JDK 1.8 Dont forget rebuild your project.

0
2

Actually I just wanted to add to the knowledge here. I often run into this problem. The thing that solves it for me is to actually change the Compiler compliance level.

Do this :

Right click on project -> Properties

Click on Java Compiler Tab

UNCHECK Enable Project Specific Settings, then click on the configure workspace settings... link and make sure your compiler compliance level is set to the preferred java version your runtime cannot support.

Once done, rebuild your project this may clear the problem.

0

This might be a problem with the jdk as well. I changed my jdk version from jdk1.8.0_65 to jdk1.8.0_25. IDE version that I have is Version: Luna Service Release 2 (4.4.2).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.