squirrel-sql-client / squirrel-sql-code

Share of the SQuirreL SQL source code originating from SourceForge, see https://squirrelsql.org
GNU Lesser General Public License v2.1
59 stars 11 forks source link

Mac detected wrong jdk #5

Closed quantrpeter closed 1 year ago

quantrpeter commented 1 year ago
Screenshot 2022-10-01 at 4 52 06 PM
/Users/peter/workspace/qemu-log-panel>/usr/libexec/java_home -V
Matching Java Virtual Machines (4):
    18.0.1.1 (x86_64) "Oracle Corporation" - "Java SE 18.0.1.1" /Library/Java/JavaVirtualMachines/jdk-18.0.1.1.jdk/Contents/Home
    17.0.1 (x86_64) "Oracle Corporation" - "Java SE 17.0.1" /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
    1.8.341.10 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_341 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-18.0.1.1.jdk/Contents/Home
gerdwagner commented 1 year ago

SQuirreL's MAC-OS start script is not able to detect the right Java Virtual Machine. It picks the one from the JAVA_HOME variable. If JAVA_HOME is not specified they pick the first from the PATH variable.

A simple fix is to add an export JAVA_HOME=<path to Java directory> in the line after "#! /bin/sh -x" of the squirrel-sql.sh script.

See also section 'trouble shooting' at https://squirrelsql.org/#installation

quantrpeter commented 1 year ago

sorry still have problem, i have set the JAVA_HOME in squirrel-sql.sh

image image
quantrpeter commented 1 year ago

For your reference, after i add this line it works

Screenshot 2022-10-02 at 10 53 49 PM
gerdwagner commented 1 year ago

Thanks for the information. Perhaps it can/needs to be turned into another alternative for the SQUIRREL_SQL_HOME alternative. It would be nice if you had a look at the following: grafik