0

Currently I am trying to use Java SE 1.8 as the build path JRE and the project facet. However I seem to be getting the error as shown below:

enter image description here

Now here is the error I get when I select Java 1.8 as the execution environment:

problem

If I change the project facet and the execution environment to 1.7, I get bombarded with these errors as shown below:

enter image description here

SDG
  • 2,260
  • 8
  • 35
  • 77
  • 1
    *"I get bombarded with these errors"* - this is what you should be happy with. Your javac started working and validating your project just fine. Probably there is a problem with your packages, that is why some classes cannot be found. Fix that one and you will be ok. – Gergely Bacso Sep 12 '15 at 17:31
  • Do you have a Java 8 JRE/JDK shown in Preferences > Java > Installed JREs? If not you need to add one. – greg-449 Sep 12 '15 at 17:39
  • @greg-449 how do you install a specific JRE for elipse? – SDG Sep 12 '15 at 17:42
  • No, but you have to tell Eclipse where to look for the JRE/JDK. You have to have a Java 8 JRE/JDK installed somewhere to use Java 8 (and Eclipse Luna or Mars) – greg-449 Sep 12 '15 at 17:44

2 Answers2

1

From Screenshot 2 and 3, I can conclude following-

  1. You don't have JRE 8 Configured. For JRE Configuration refer Stakoverflow-Configure JRE In Eclipse

  2. You're getting Type resolving issues. This means either you need project cleanup or you're missing package declaration. Refer this-Why I got cannot be resolved to type error

Hope this helps.

Community
  • 1
  • 1
Pankaj
  • 592
  • 7
  • 19
1

I had the same problem and I fixed it by giving right path of the JRE to the eclipse.

akash
  • 22,664
  • 11
  • 59
  • 87
kadév
  • 11
  • 2