In Eclipse, I am getting an error:
Build path specifies execution environment Java SE 1.7.
There are no JREs installed in the workspace that are st
Go to Project|Properties Choose the Java Build Path section Select the current JRE System Library, and choose Remove Select Add Library, and under the JRE System Library category pick your system library; you probably just need to choose the Workspace default JRE
More generally, under Window|Preferences, you can check Java|Installed JREs|Execution Environments to know which of the installed JREs match a specific execution environment.
I have this situation because I have multiple JDKs, and the JREs are nested below them. I'm building a JRE8 project but my current default is the latest v11. So the challenge is to get Eclipse to recognize the JDK>JREv8.
On build the error goes away. :)
Try this
In Eclipse,
your project
-> properties
-> java build path : Libraries
Remove the "JRE System Library[J2SE 1.4]"
-> click "Add Library" button -> JRE System Library
-> select the new "Executin Environment" or Workspace default JRE
Solved by
Right click on JRE System Library
Select Properties
Choose Workplace Default JRE
Apply and Close
This should work:
C:\Program Files\Java\jdk1.7.{x}
.
If you don't have it, you need to install it.C:\Program Files\Java\jdk1.7.0_80
."Execution environment" will be JavaSE-1.7 (jdk1.7.0_80) now.