Problems starting Eclipse after updating JDK on OSX

I came across this problem when updating jdk via brew. Somehow brew removed openjdk-12 and replaced it with 14. Pesky.

After some checks, I figured the Eclipse 2020-06 executable was relying on a hardcoded openjdk path.

To rectify this, I’ve done the following:

  1. Determine the jvm available on osx by dropping to command line and running ‘/usr/libexec/jvm_home -V’

Below is a screen capture of the available openjdks on my OSX. (openjdk-12 was removed somehow). Remember the location of the openjdk directory you wish to use.

2. Edit the openjdk path in eclipse.ini. The path to eclipse.ini is as follows:

Note: I have mine in $HOME/eclipse/java-2020-06. Yours could be in the Applications directory (ie /Applications/Eclipse)

Run ‘nano eclipse’

3. To get this:

eclipse.ini pointing to missing openjdk-12 folder

4. Amend the folder name to the openjdk directory that you’ve determined in Step 1.

I’ve selected openjdk-14.0.2.jdk

5. Ready to start Eclipse by running the eclipse executable.

Leave a Reply

Your email address will not be published. Required fields are marked *