4

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.

Danubian Sailor
  • 1
  • 38
  • 145
  • 223
Harry_S
  • 233
  • 4
  • 10

3 Answers3

1

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>
CodeFanatic
  • 11,434
  • 1
  • 20
  • 38
0

Have a look at below links. I hope it will help you to solve problem :-

“Faceted Project Prblem (Java Version Mismatch)” error message - Stackoverflow

Eclipse: Java compiler level and project facet mismatch

Community
  • 1
  • 1
OO7
  • 2,785
  • 1
  • 21
  • 33
0

You should change in (org.eclipse.wst.common.project.facet.core.xml) file.

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <installed facet="jst.ear" version="5.0"/>//version based on in your RAD
</faceted-project>
Bsquare ℬℬ
  • 4,423
  • 11
  • 24
  • 44
Murali
  • 1