Community
Participate
Working Groups
Just downloaded Eclipse 2019-06 for OSX. Installed (with the installer), and selected AdoptOpenJDK 11.0.4, installed via SDKman to the default location on OSX, which is: ~/.sdkman/java/candidates/java/11.0.4.hs-adpt The installer appended /bin to the path, which means the vm argument is pointing to the directory that contains "java" as an executable. On startup, Eclipse tells me that I need to install Java SE 6, with a dialog box with the text: "To open "Eclipse" you need to install the legacy Java SE 6 runtime. Click "More Info..." I corrected it by opening eclipse.ini and pointing it to the contents of /usr/libexec/java_home -v 11 (the system JDK 11). I could not get it to run with the SDKMan JVM.
That's also reported here: https://stackoverflow.com/questions/56686052/sdkman-does-not-work-with-eclipse-app-or-springtoolsuite4-app-on-mac it looks like you have somehow to trick Eclipse by linking the path of a JDK installation to the path where SDKMAN installs its version...
By the way, that's even worse if you install Eclipse via Oomph: Oomph lets you select the available JREs in the system (including SDKMAN installations); Oomph then adds the correct -vm argument in eclipse.ini (in case you select the SDKMAN installation, which is different from a JDK system installation) and the installed Eclipse will not start...
After several attempts the only way I found to make Eclipse work with a JDK installed with SDKMAN (or any other JDK that does not have the macOS directory layout [1]) was specifying it on eclipse.ini as: -vm /Users/<YOUR_USER>/.sdkman/candidates/java/current/jre/lib/jli/libjli.dylib or more generally: -vm /<PATH_TO_YOUR_JDK>/jre/lib/jli/libjli.dylib It's worth to note that the wiki entry explaining how to specify the JVM for macOS [2] does not mention it. Moreover, it seems that by design the Eclipse launcher uses the macOS JavaVM Framework "MacOSX: The launcher uses the system JavaVM framework and will always load the vm in-process using the JNI invocation API." [3] Using a JDK with a macOS directory layout (like the macOS .tar.gz version from AdoptOpenJDK) allows us to specify it as: -vm /<PATH_TO_YOUR_JDK>/Contents/Home/bin/java [1] https://medium.com/adoptopenjdk/macos-binary-changes-8293f154c5dc#a322 [2] https://wiki.eclipse.org/Eclipse.ini#-vm_value:_Mac_OS_X_Example [3] https://help.eclipse.org/2020-03/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Flauncher.html&cp%3D2_1_5_1 [4] https://adoptopenjdk.net/releases.html
*** Bug 567590 has been marked as a duplicate of this bug. ***
> It's worth to note that the wiki entry explaining how to specify the JVM for macOS [2] does not mention it. This wiki is open for edition. Please add the necessary content to that page.
Thanks Mickael! Didn't know that was open for edition to everyone. I have made some improvements to the macOS section [1]. Feedback or corrections are welcomed. [1]: https://wiki.eclipse.org/Eclipse.ini#-vm_value:_macOS_Example