Reputation: 41
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
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:
Right click in your project, then choose properties
-->Java Build Path
.
2. Add a new JRE System Library:
Click the button add Library then choose JRE System Library
:
3. Choose the installed JRE Library:
Click the Installed JREs... button and choose the installed JRE in your system.
Hope it helps.
Upvotes: 1