Warm tip: This article is reproduced from stackoverflow.com, please click
java macos homebrew sql-workbench-j

"Unable to load Java Runtime Environment" when starting SQLWorkbench/J

发布于 2020-04-04 10:16:42

I get Unable to load Java Runtime Environment when starting SQLWorkbenchJ.app.

I'm on macOS Catalina 10.15.2, and I installed the app with brew cask install sqlworkbenchj. I have JDK 8 from adoptopenjdk installed.

How do I solve this problem? SQLWorkbench/J does not provide any other helpful messages, even when when I start it with open -a on the command line.

Questioner
neu242
Viewed
332
neu242 2020-01-31 22:42

Luckily I found a hint on SQLWorkbench/J's forum

The fix was to add ...

<key>JVMRuntime</key>
<string>adoptopenjdk-8.jdk</string>

... to /Applications/SQLWorkbenchJ.app/Contents/Info.plist, and create a symlink to JDK8:

ln -s /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk /Applications/SQLWorkbenchJ.app/Contents/PlugIns/

Voila!