javaeclipsefacetibm-rad

IBM RAD - Java Compiler & Project Facets Mismatch


I have installed both Java 1.6 & 1.7 on my system. I am using IBM RAD 8.5 (Built on top of Eclipse) for development and Currently trying to see what errors/warnings I get in case I compiler by Java 1.6 build project with Java 1.7 compiler.

If I go to "Project->Properties->Java Compiler" then I am able to see version "1.7" among the listed Compiler Compliance Levels. BUT when I go to the "Project->Properties->Project Facets" then I am able to see only facets upto 1.6 and 1.7 is NOT listed there.

When I try to compile this project by keeping project facets as 1.6 and compiler as 1.7 then I get Project Facets Mismatch error. The error says: - Java Compiler Level does not match the version of the isntalled Java Project Facet.

Please suggest what changes do I need to do so that "1.7" becomes visible under the installed Java Project Facets. Thanks.


Solution

  • EDIT:

    Did not read your Question carefully enough......

    May try going to org.eclipse.wst.common.project.facet.core.xml which is located in your .settings folder of your Project and edit it manually to 1.7 like this:

    <installed facet="java" version="1.7"/>
    


    Looks like you have a faceted Project, maybe try going to Project->Properties->Project Facets and look if Java is set to 1.7.

    enter image description here

    Else if you are using maven put this

    <properties>
             <maven.compiler.target>1.7</maven.compiler.target>
            <maven.compiler.source>1.7</maven.compiler.source>  
    
    </properties>