SQL Workbench/J fails to start when java 9-ea is present

7,276 views
Skip to first unread message

Vladimir Sitnikov

unread,
Mar 1, 2016, 11:02:10 AM3/1/16
to SQL Workbench/J - DBMS independent SQL tool
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home

$ /Applications/SQLWorkbenchJ.app/Contents/MacOS/JavaAppLauncher
*** Cannot run this application ***
SQL Workbench/J requires Java 8, but only 9-ea was found

If you do have Java 8 installed, please point JAVA_HOME to the location of your Java 8 installation.
or refer to the manual for details on how to specify the Java runtime to be used.


Can SQL Workbench/J support java 9 as well?

Austin Arbor

unread,
Jun 15, 2017, 5:05:38 PM6/15/17
to SQL Workbench/J - DBMS independent SQL tool
I had the same issue and found the cause to be due to lines 72-74 of WbStarter.java which parses the java version incorrectly for java 9 versions (see http://openjdk.java.net/jeps/223).  I'm not sure why the system property "java.version" is being set to 9-ea, since the application is getting launched by the java8 JRE, but either way, I have let the support team know and hopefully it will get integrated into the next release. For now, I run the command "java -jar /Applications/SQLWorkbenchJ.app/Contents/Java/sqlworkbench.jar </dev/null &>/dev/null &" and it launches correctly.

Nick Reddel

unread,
Feb 17, 2018, 1:26:07 PM2/17/18
to SQL Workbench/J - DBMS independent SQL tool
You can specify the JVM for the app like this:
ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk /Applications/SQLWorkbenchJ.app/Contents/PlugIns/jdk1.8.0_152.jdk

and edit /Applications/SQLWorkbenchJ.app/Contents/Info.plist, adding:

<key>JVMRuntime</key>
<string>jdk1.8.0_152.jdk</string>

James McMurray

unread,
May 23, 2018, 12:25:30 PM5/23/18
to SQL Workbench/J - DBMS independent SQL tool
Thanks Nick, this worked perfectly!

Vicky Raj

unread,
Jun 4, 2018, 5:24:06 AM6/4/18
to SQL Workbench/J - DBMS independent SQL tool
This worked for me as well... Thanks :)
Reply all
Reply to author
Forward
0 new messages