SQL Workbench/J Git Repository https://www.sql-workbench.eu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

59 lines
1.5 KiB

#!/usr/bin/env bash
# Start SQL Workbench/J in GUI mode
function readlink() {
case `uname -s` in
Linux*)
command readlink -e "$@"
;;
*)
command readlink "$@"
;;
esac
}
SCRIPT_PATH=$(dirname -- "$(readlink "${BASH_SOURCE[0]}")")
JAVACMD="java"
if [ -x "$SCRIPT_PATH/jre/bin/java" ]
then
JAVACMD="$SCRIPT_PATH/jre/bin/java"
elif [ -x "$SCRIPT_PATH/jre/Contents/Home/bin/java" ]
then
# MacOS
JAVACMD="$SCRIPT_PATH/jre/Contents/Home/bin/java"
elif [ -x "$WORKBENCH_JDK/bin/java" ]
then
JAVACMD="$WORKBENCH_JDK/bin/java"
elif [ -x "$JAVA_HOME/jre/bin/java" ]
then
JAVACMD="$JAVA_HOME/jre/bin/java"
elif [ -x "$JAVA_HOME/bin/java" ]
then
JAVACMD="$JAVA_HOME/bin/java"
fi
cp="$SCRIPT_PATH/sqlworkbench.jar"
cp="$cp:$SCRIPT_PATH/ext/*"
os=`uname -s`
OPTS="--add-opens java.desktop/com.sun.java.swing.plaf.motif=ALL-UNNAMED"
if [ "$os" = Darwin ];
then
# this would result in a warning on non MacOS systems
OPTS="$OPTS --add-opens java.desktop/com.apple.laf=ALL-UNNAMED"
fi
# When running in batch mode on a system with no X11 installed, the option
# -Djava.awt.headless=true
# might be needed for some combinations of OS and JDK
# For High-DPI screens the following system properties might be needed:
# -Dsun.java2d.uiScale=125%
# -Dsun.java2d.uiScale.enabled=false
exec "$JAVACMD" $OPTS \
-Dawt.useSystemAAFontSettings=on \
-Xverify:none \
-Dvisualvm.display.name=SQLWorkbenchJ -cp "$cp" workbench.WbStarter "$@"