Eclipse: The specified JRE installation does not exist

落花浮王杯 提交于 2019-11-30 08:02:19

I had the same problem. This is how I fixed it.

  1. Open Eclipse.
  2. Go to Preferences.
  3. Click Add
  4. A Window should popup with this:

  1. Select Standard VM.
  2. Select Directory
  3. Use this path: Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/
  4. Click Open
  5. Then Finish
  6. Right click your Project then click Properties
  7. Select Java Build Path then click Add Library
  8. Select JRE System Library

  1. Click Environments and select the jdk1.7.0_45
  2. Finish

This is what you should see if you did it right:

Your run configurations maybe trying to use a specific JRE.

Make sure you are using the correct JRE there.

The problem is generally related to project or plugin-specific runtime configurations that (still) point to some JDK/JRE that is not existing anymore (e.g. after some update or migration).

We had this e.g. with the ANT plugin, where the launch configuration had to be updated (per ant build file), if it was e.g. not set to the default ~ run in same JRE as workspace.

You will find these settings (typicall under the JRE tab) either:

  1. in the global plugin configuration under Eclipse -> Window -> Preferences -> ... of your plugin (typing runtime in the Filter section above may help to find it quickly).

  2. or it is set in a project/file-specific run configuration which you should see if you go to

    • Eclipse -> Run -> Run configurations... or
    • right click on your project/file and select Run As -> Run Configurations ...
  3. or it is set in a project/file-specific external tool configuration (e.g. like used by ANT) which is similarly to be found here:

    • Eclipse -> Run -> External Tools -> External Tools Configuration ... or
    • right click on your project/file and select Run As -> External Tool Configurations ...

In eclipse click Window –> Show view –> Servers

Once you are in servers view double click configured server to open its configuration and click Runtime environment link (in the left side).

Select the JRE and click finish.

Hope it help you

I had the problem with one particular run configuration (unittests for one project in my case). In Run Configurations, I selected the troubled run configuration, then the JRE tab, and I could see it was broken (even though I couldn’t tell how it had happened). Selecting the right JRE solved my problem (project JRE in my case, even though this was just my standard JRE and not configured for the project specifically).

I had the same problem. This solution might help fix the issue as it did for me.

  1. Right click on the project -> Build Path -> Configure Build Path
  2. In the Libraries tab, select JRE System Library and click Edit
  3. In the Edit window you can either select Workspace default JRE or in Execution environment drop down select the JRE installed

This happened to me when I updated Java. Though it was updated in my system, it didn't update the references in eclipse. I was working on web projects so I had to do the following steps

  1. Windows > Preferences > Java > Installed JREs (here the old version was present without showing any error) > Remove any old versions that are not present in your system and Add latest release or the present ones.

  2. Confirm Build Path of your projects and confirm they are pointing at the correct JRE. Project > Build Path > Check JRE version is correct

After doing this my project still gave me the same error so I checked JRE for my tomcat servers setup in eclipse

  1. Window > Preferences > Server > Runtime Enviroments > Select each server and edit it, reselect the jre and apply (it took me some time here to make eclipse realise i had the correct JRE selected).

Thats it, try running now it it should work.

Main Cause of this Error is You Maybe forgot the set Build patch. When you Import Old Project this time Old Java Build Patch Existing You Have to give New One which one you currently using in your work space.

Process:- Right Click Project -> Build patch -> Configure Build path-> Add Library-> System Library-> Set JRE (Default or Alternative)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!