Eclipse Error: project facet java 1.7 is not supported by target runtime apache tomcat v6.0

We are upgrading some Java Projects from Java 6 to Java 7.  We use Eclipse yet still need to use Apache Tomcat 6.0.x.  After downloading and installing the a JDK 7 and changing all the necessary references in Project Preferences to Java 7 (e.g. Java Build Path, Java Compiler, etc.), I was still left with this error:

project facet java 1.7 is not supported by target runtime apache tomcat v6.0

Here is the fix:

  1. Window Menu -> Preferences
  2. On the left, select Server -> Runtime Environments
  3. Highlight “Apache Tomcat v6.0” and select the “Edit…” button
  4. On the “Edit Server Runtime Environment” dialog, change the JRE to be a Java 7 JDK or JRE.
  5. Rebuild your project and the error should go away.

 

Advertisements

About stevewall123

I am a Lead Software Engineer in Minneapolis working for Thomson Reuters. I am currently working on projects using Java, JavaScript, Spring, Drools, Hazelcast, Liquibase and Tomcat. Previously, I used C#, GWT, Grails, Groovy, JMS and JBoss Drools Guvnor. In the past I have worked on projects using J2EE, Swing, Webwork, Hibernate, Spring, Spring-WS, JMS, JUnit and Ant.
This entry was posted in Java, Tomcat and tagged , , . Bookmark the permalink.

3 Responses to Eclipse Error: project facet java 1.7 is not supported by target runtime apache tomcat v6.0

  1. Thanks Steve.
    I had faced the same issue while using Tomcat 7.0, and I could resolve the issue using your fix.

  2. It should be noted that you need the JST Server Adapters installed for the steps above to work, and to have had created a server using the Apache Tomcat adapter, not the default ones HTTP Preview or HTTP Server.

  3. that helped , thanks a lot!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s