0

I have an application that used to run on Java 1.5. It compiled and ran well. Recently, I've decided to migrate to Java 1.7.

When I compile the code with Maven (I updated the Java version in the pom.xml), it displays several compilation errors, saying somes references to some methods are ambiguous, which is true. However, on Eclipse, those errors are not shown (I have also updated the compiler of Eclipse to 1.7).

A friend of mine tried to do the same thing on Eclipse Juno and the errors are showing.

Any ideas how to fix that?

Thanks

Khoa Nghiem
  • 315
  • 1
  • 18

1 Answers1

0

This problem is because the Eclipse thinks that your project is stil on java 1.5.

  1. You need to go to Project -> Properties -> Java Buildpath -> Libraries and remove the old Jre.
  2. You need to go to Project -> Properties -> Java Buildpath -> Libraries -> Add Library -> Add JRE System Library and ad the new Jre 7 library.
AlexGo
  • 487
  • 4
  • 19