go to control panel - check whether any new java version updated -uninstall it and configure the build path jre library "execution environment" to the previous version.

probably if java 7 is updated to java 8 the above problem will occur. to avoid that warning, just you can uninstall the new update and restore the old version in execution environment.


  1. open eclipse
  2. right click on your project -> click "properties"
  3. select "java build path" and then choose librarires
  4. delete jre system library [jre1.._***]
  5. click "add library" and then choose "jre system library"
  6. the best solution is to mark "workspace default jre (jre1.,_***)
  7. refresh project and wait for tomcat or any other additional server to restart and then should be no error for "execution environment.."where to do it!


exact solution right click on your project

  1. properties

  2. java build path --> libraries and enter image description here

  3. modulepath --> add library enter image description here

  4. jre system library, next> choose "workspace default jre" and finish. solved!


<< if you're using gradle >>

set gradle java-home in windows>preferences. and see project's config. so gradle won't use eclipse default jvm and let you work with another jre.


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.

  1. go to preferences > java > installed jres.
  2. click add.
  3. navigate to the jre under the jdk, which in my case is c:\program files\java\jdk1.8.0_152\jre.
  4. change the jre name to jdk8 jre8 just for clarity.
  5. click finish.

on build the error goes away. :)


solved by

right click on jre system library
select properties
choose workplace default jre
apply and close


sounds like what i had after installing a newer eclipse.

my solution:

window->preferences, java->installed jres->execution environment.

click the correct environment in the left panel, probably javase-jre7

if the checkbox in the right panel is empty, check it.

if it's checked, but it isn't named jre7 [perfect match] then find the one in the left panel that does have 'perfect match' on the right and check that instead.


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.


this should work:

  • your project > build path > configure build path.
  • go to libraries tab.
  • select jre system library [javase-1.7].
  • press edit.
  • notice that "execution environment" is javase-1.7 (jdk1.8.{y}).
  • click on installed jres.
  • you should see jdk1.8.{y} but not jdk1.7.{x}.
  • press add.
  • select standard vm.
  • press next.
  • locate your java folder, e.g.: c:\program files\java\jdk1.7.{x}. if you don't have it, you need to install it.
  • populate jre home with it. e.g. c:\program files\java\jdk1.7.0_80.

"execution environment" will be javase-1.7 (jdk1.7.0_80) now.


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

Related Query

More Query from same tag