I am Launching SQuirrel SQL on Mac OS X(El Capitan) that has JDK1.8 on it produces an error message saying the JDK-version should be at least 1.6. It then quits. SQL client version is 3.7. How do I resolve this?
Asked
Active
Viewed 1.6k times
3 Answers
68
I ran into similar issue and the following change fixed the issue. Open the Application Folder in finder and open the App Package Contents and navigate to Contents/MacOS/. Open the squirrel-sql.sh file and update the value of "SQUIRREL_SQL_HOME" around line 56.
Out of box, the value would be
SQUIRREL_SQL_HOME=`dirname "$0"`/Contents/Resources/Java
Update this to
SQUIRREL_SQL_HOME='/Applications/SQuirreLSQL.app/Contents/Resources/Java'
Thanks to https://sourceforge.net/p/squirrel-sql/bugs/1232/#6bc6

Vijay
- 1,082
- 8
- 6
-
6The .sh script has three alternate versions of the command to set the SQUIRREL_SQL_HOME variable. The second one worked for me on MacOS High Sierra 10.13.6 using Squirrel version 3.8.1. – Dave Mulligan Sep 25 '18 at 22:26
-
1Worked on macOs Mojave – ifelse.codes Nov 11 '18 at 19:02
-
1I consider @DaveMulligan 's comment the safer option. Did the trick for me on Mojave 10.14.4 with SQuirreL SQL 3.9.1. – Ray Mar 27 '19 at 10:10
-
BTW, on macOS Catalina, modifying anything inside `/Applications/SQuirrelSQL.app` will prevent the app from launching in the first place. – Rockallite Jun 29 '20 at 09:13
10
- Open the squirrel-sql.sh file (
/Applications/SQuirreLSQL.app/Contents/MacOS/squirrel-sql.sh
) - Follow the suggests at line 62 to choose the right '
SQUIRREL_SQL_HOME=...
' line by commenting the wrong one and uncommenting the right one. Just like this:
##################################################################################################
# CHANGE_HERE
# Mac users are not able which of the three lines below works correctly, see bugs 1287, 1321, 1310.
# Thus if you have problems running SQuirreL on IOS please try out the alternative lines
##################################################################################################
# SQUIRREL_SQL_HOME=`dirname "$0"`/Contents/Resources/Java
SQUIRREL_SQL_HOME=$(echo $ABSPATH | grep -o '^/.*/Contents/')Resources/Java
# SQUIRREL_SQL_HOME=`dirname "$0"`/../Resources/Java

Rockallite
- 16,437
- 7
- 54
- 48

Song
- 101
- 1
- 2
2
The shell script now comes with Alternative solutions ready. Alternative 2 works for me. Just commented out Alternative 1 and uncommented the 2.
#Alternative 1
#SQUIRREL_SQL_HOME=`dirname "$0"`/Contents/Resources/Java
#Alternative 2
SQUIRREL_SQL_HOME=$(echo $ABSPATH | grep -o '^/.*/Contents/')Resources/Java
#Alternative 3
#SQUIRREL_SQL_HOME=`/Applications/SQuirreLSQL.app/Contents/Resources/Java'
Open the script file as in @vijay answer.

Saran
- 6,274
- 3
- 39
- 48
-
This one truly solves the problem. BTW, the shell script is here: `/Applications/SQuirreLSQL.app/Contents/MacOS/squirrel-sql.sh` – Rockallite Jul 15 '19 at 02:58