Eclipse - Mac Os Default JRE missing
Asked Answered
C

9

15

The list of installed JRE's is empty, when I click "add" the only options I'm given are - Execution Environment Description, Standard 1.1.x VM, Standard VM.

There's no option for a MacOS Default JRE and choosing standard VM results in the usual "Standard VM not supported on MacOS".

Eclipse Galileo, Mac OS X 10.5.8.

Any suggestions much appreciated

Celik answered 15/11, 2009 at 8:29 Comment(3)
Just added a suggestion about eclipse.ini in my answer to address the lack of any JVM in the installed JRE list.Nikos
I would recommend copying those plugins to an dropins folder like the one I describe in #1706021. PDT should be added through p2 mechanism.Nikos
Update:- Installing Helios gives me the correct JRE's and the correct default jre is selected, I can also choose 'add' and see the option to add a Mac OS JVM. Installing Galileo also gives me the jre and the option to add a Mac OS JVM. BUT, installing the Galileo-PDT all in one package gives me NO jre and no option to install a Mac OS JVM. I've installed Galileo and added PDT as a plugin which works fine, now just to re-add all the other plugins I had in my old installation.Celik
B
24

I just had the same problem and I was able to fix it. I had installed Eclipse for PHP (PDT) because I couldn't get PDT to work with Eclipse classic. I then found out that with the new install, Java files won't run! But there's a simple solution:

Go to Help->Install New Software...

Select:

Galileo - http://download.eclipse.org/releases/galileo

Under Programming Languages choose:

Eclipse Java Development Tools 3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ

Install and you'll find your JREs!

Betrothed answered 16/2, 2010 at 5:16 Comment(1)
Was banging my head for hours, thank you. Works for the July 2014 Android SDK release for Mac.Sopher
D
10

1) Follow Joshua's answer: "Help->Install New Software... Select: Galileo - http://download.eclipse.org/releases/galileo Under Programming Languages choose: Eclipse Java Development Tools 3.5.x..."

2) Then go to Eclipse -> Preferences -> Java -> Installed JREs.

3) Click ADD.

4) Under 'Installed JRE Types" you should see the previously missing "MacOS X VM". Select this and click NEXT.

5) Click the BROWSE button next to the JRE home field, and the dialog box should say "Select the root directory of the JRE installation"

6) Browse to /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home

7) Click OPEN.

8) In the JRE name field type "JVM 1.5"

9) From there you should just be able to click FINISH and have your JRE available.

I used this to fix a missing JRE error building a Google App Engine project.

Delinquency answered 8/3, 2010 at 16:6 Comment(1)
Excellent... I was searching for almost an hour for this..! Thanks!Dosh
N
4

The "Standard VM not supported on MacOS" message has been seen since eclipse3.3 (2006!).

The bug 156343 reports it fixed in the... eclipse3.6M2 (Helios, M2 released in September 2009, final version to be released in June 2010)


If there is no JVM at all, try to specify one explicitly in the eclipse.ini (like the one I propose, except I use Windows-like path), and see if there is still no JVM proposed in this list after restart.
Check that also with Helios3.6M3 (latest Milestone currently available, and check if all the issue is still there.


A current workaround (that is, if a default VM was there in the first place) would be to, for example for a JDK like the JRockit one:

add the JRockit VM's jars as libraries.
The Mac's classes will take precedence (since they're on the boot classpath) but you'll also be able to see any specifics in the Jar of the attached bundle.

To keep JDT sane, you should probably ensure that the Mac's VM comes first in the .classpath though ...


The 3.6M2 will authorize this, for instance:

Installed JRE

Nikos answered 15/11, 2009 at 8:53 Comment(3)
I think this bug report assumes the person already has the Mac VM added, I don't even have that much as there's no option to add a Mac VM.Celik
@Jonathon: true, but could you try the 3.6M2 (or M3 for that matter) and check if you can add a Mac VM with it?Nikos
@Nikos I installed Helios and you're right, I have the option to add MacOS JVM, helios picks up the mac jre's automatically and assigns the correct one. My Galileo version is the one bundled with PDT, and has a lot of plugins already added, is there anyway I can port those plugins over to Helios, or at least get Helios to pick up the "available software sites" ?Celik
C
2

I updated my java version to 11 and my Spring Boot project in eclipse also crashed. Here's how I fixed this:

(Eclipse will find the JRE path for you)

  1. Eclipse -> Preferences -> Java -> Installed JREs
  2. Click on the Search button on the right and it will direct you to updated JREs.
  3. Select Newly Updated JRE and apply changes.

Screenshot of Eclipse -> Preferences -> Java -> Installed JREs

Screenshot of Eclipse -> Finding JRE Path

Screenshot of Eclipse -> Selecting JRE Path

Cleaner answered 5/11, 2020 at 15:36 Comment(0)
L
0

You have an "add" button in there which lets you add a new JVM. In fact, there should even be a "look for JVMs" button.

If you really don't have one handy, just download a JDK from Sun and then use add to add it to your list of JVMs, and set it to be the default.

Lobule answered 15/11, 2009 at 8:34 Comment(3)
When you click "add" you have to choose what type of VM to add. The only options are "Standard VM","Standard 1.1.x VM" and "Execution Environment Description". Choosing one of these results in "Standard VM not supported on MacOS" error. All the searches I've done on the problem suggests there is supposed to be a "MacOS Default" option available as well. I know the location of the JVMs, just can't add one. Clicking the search button brings up the 'operation in progress' dialogue for less than half a second before it fails.Celik
The JDKs from Sun do not work on Mac OS X. On Mac OS X, one must use the version of the JVM/JDK provided by Apple.Crowl
Sorry about that! I got it working without a problem on my MacBook and naturally forgot exactly how I did it.Lobule
C
0

I'm not sure what exactly your question is...

If you want to know where the JVM/JDK resides on Mac OS X, the various versions can be found in /System/Library/Frameworks/JavaVM.framework/Versions. Just add one of these to Eclipse.

Carlynne answered 15/11, 2009 at 8:36 Comment(0)
D
0

If you want OSX's built-in JVM, then you can add it as a Mac OSX VM, else the comment of VonC tells you what to do.

Desperate answered 15/11, 2009 at 20:58 Comment(0)
C
0

I had this exact problem with the same version of Eclipse and Mac OS X. A minor detail note, it was the PHP version of Eclipse. I couldn't determine a resolution within Eclipse, but downloading the normal version of Eclipse yielded the ability to select the Mac VM.

Coly answered 20/1, 2010 at 15:37 Comment(0)
U
0

Eclipse Mars

Eclipse Market Place -> Type "Java" and install "Java 8 support for Eclipse Kepler SR2"

Java 8 support for Eclipse Kepler SR2

Uniat answered 10/1, 2016 at 10:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.