Eclipse: The specified JRE installation does not exist
Solution 1
I had the same problem. This is how I fixed it.
- Open Eclipse.
- Go to
Preferences
. - Click
Add
- A Window should popup with this:
- Select
Standard VM
. - Select
Directory
- Use this path:
Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/
- Click
Open
- Then
Finish
- Right click your Project then click
Properties
- Select
Java Build Path
then clickAdd Library
- Select
JRE System Library
- Click
Environments
and select thejdk1.7.0_45
Finish
This is what you should see if you did it right:
Solution 2
Your run configurations maybe trying to use a specific JRE.
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:
in the global plugin configuration under
Eclipse -> Window -> Preferences -> ...
of your plugin (typingruntime
in theFilter
section above may help to find it quickly).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 ...
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).
Fisher Coder
A hands-on problem solver, love building cool things.
Updated on August 29, 2020Comments
-
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
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.
-
Fisher Coder over 9 yearsThis is very helpful! But when I've put that path (Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home) 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 over 9 yearsTry 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 theHome
. It might also be that you have a different idk installed, you should find out if you go folder by folder. Start on theLibrary/Java/
-
Fisher Coder over 9 yearsThis is great! It works now! Thanks a lot! @FunctionR
-
Fisher Coder over 9 yearsI 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 over 9 yearsBut 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 over 9 yearsCool! It works now! Thanks again and sorry for the back and forth! :)
-
user198003 over 9 yearsGreat one! Thank you!
-
CodeMed about 9 yearsA 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 almost 9 yearshere is e.g. a specific (Tomcat launch) problem with screenshots: stackoverflow.com/questions/11170263/…
-
Macneil Shonle over 8 yearsExcellent! I had both the problem solved by the accepted answer and the problem solved by this answer!
-
Max Alexander Hanna almost 7 yearsthis was actually the fix for me, nothing else worked.
-
GaidinD almost 6 yearsThis 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?