Eclipse: The specified JRE installation does not exist

107,355

Solution 1

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:

enter image description here

  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

enter image description here

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

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

enter image description here

Solution 2

Your run configurations maybe trying to use a specific JRE.

enter image description here

Make sure you are using the correct JRE there.

Solution 3

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

Solution 4

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 ...

Solution 5

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).

Share:
107,355
Fisher Coder
Author by

Fisher Coder

A hands-on problem solver, love building cool things.

Updated on August 29, 2020

Comments

  • Fisher Coder
    Fisher Coder over 3 years

    I used to have Eclipse configured well and work fine before. But I just uninstalled it and installed Eclipse Juno again on my Mac OS 10.10 today. But I kept getting this error: "The specified JRE does not exist."

    I know it's a pretty simple and commonly seen problem, I just needed to install JRE and/or JDK into this clean Eclipse, however things didn't get work out.

    And I've searched extensively on Stack Overflow: The posts I've looked at including: How to install JRE 1.7 on Mac OS X and use it with Eclipse? I followed exactly what the accepted answer said, but after having downloaded the JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html and installed it, I was going to add it to Eclipse via Preferences -> Java -> Installed JREs, however, I didn't see it as expected, the following is a screenshot of what I saw when I went to Preferences -> Java -> Installed JREs

    enter image description here

    But the screenshot just says the installed JREs list is BLANK, I couldn't add any JRE into my Eclipse.

    Help please?

    Also, I've tried other things that people have suggested: Properties -> Java Build Path what I see here is: JRE System Library OSGi/Minimum-1.2 with a red crossing sign in front of it (indicating something wrong with it?) So, I'm also blocked with this approach.

    enter image description here

  • Fisher Coder
    Fisher Coder over 9 years
    This is very helpful! But when I've put that path (Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/H‌​ome) into the directory, I got this message:"The home directory does not exist", I think I can understand this error message as it says, I don't really have this directory set up. Then I searched and found this link: stackoverflow.com/questions/10352715/…. but still it didn't work out for me. I know your response makes me almost there. I'm just missing something. Could you offer any more guidance please?
  • apxcode
    apxcode over 9 years
    Try the path with /Home/ at the end, that might do it. If not try going to the path yourself, folder by folder until you find the Home. It might also be that you have a different idk installed, you should find out if you go folder by folder. Start on the Library/Java/
  • Fisher Coder
    Fisher Coder over 9 years
    This is great! It works now! Thanks a lot! @FunctionR
  • Fisher Coder
    Fisher Coder over 9 years
    I messed something up. OK, I've downloaded two Eclipse on my Mac pro. So, the other one was previously working fine. I mistook it for the nonfunctioning one. Sorry for this. So now when I was trying to make this nonofunctioning one to work and followed your steps, it's not working, so when I tried to use the path, it always says "The home directory does not exist", as this pic shows: postimg.org/image/54hu8ngkx, however, as you taught me, I did look for "/Home/", starting from /Library/, here's the path pic: postimg.org/image/cxu9xj4qf, everything looks right.
  • Fisher Coder
    Fisher Coder over 9 years
    But it just still shows "The home directory does not exist", so I'm very confused. Sorry to ask again. But any more help is really appreciated!
  • Fisher Coder
    Fisher Coder over 9 years
    Cool! It works now! Thanks again and sorry for the back and forth! :)
  • user198003
    user198003 over 9 years
    Great one! Thank you!
  • CodeMed
    CodeMed about 9 years
    A quick hack is just to import the project into a different workspace which does not throw this error. Inelegant, I know. But works in 30 seconds or less.
  • Andreas Covidiot
    Andreas Covidiot almost 9 years
    here is e.g. a specific (Tomcat launch) problem with screenshots: stackoverflow.com/questions/11170263/…
  • Macneil Shonle
    Macneil Shonle over 8 years
    Excellent! I had both the problem solved by the accepted answer and the problem solved by this answer!
  • Max Alexander Hanna
    Max Alexander Hanna almost 7 years
    this was actually the fix for me, nothing else worked.
  • GaidinD
    GaidinD almost 6 years
    This is the only answer that helped, and ideally should be the first thing that is being checked. Just out of curiosity, any reason why the JRE from here gets removed?