Banging My Head Against the Wall

What I wish I knew before I started…

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.

 

,

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

  1. 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.

Leave a comment