monsterbananas
monsterbananas

Reputation: 41

Eclipse Luna 1.7 to 1.8 errors

I was working in Eclipse Luna and tried to write a static method in an interface but it gave me an error. I moused over it and I forgot what it said but it was something like ... 1.8 JRE. So I clicked it and now there's an error on almost every line saying things like:

String cannot be resolved to a type

and

java.lang.Object cannot be resolved

How to go back to fix it?

Upvotes: 0

Views: 256

Answers (1)

cнŝdk
cнŝdk

Reputation: 32145

The problem here is a confusion in your eclipse between the Installed JRE in your system and the used JRE in your project, so to resolve point to the installed JRE in your system, like this:

  1. Open your project build path configuration:

Right click in your project, then choose properties-->Java Build Path.

enter image description here

2. Add a new JRE System Library:

Click the button add Library then choose JRE System Library:

enter image description here

3. Choose the installed JRE Library:

Click the Installed JREs... button and choose the installed JRE in your system.

enter image description here

Hope it helps.

Upvotes: 1

Related Questions