From 8f6a393d897d266a11a5dd0c5446b6403635bec1 Mon Sep 17 00:00:00 2001 From: Tomas Pluskal Date: Sat, 16 Apr 2016 08:32:06 -0400 Subject: [PATCH] Fixed the Mac OS X script in case there is not JDK installed, only JRE --- src/main/scripts/startMZmine_MacOSX.command | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/scripts/startMZmine_MacOSX.command b/src/main/scripts/startMZmine_MacOSX.command index de455dd..a997acb 100755 --- a/src/main/scripts/startMZmine_MacOSX.command +++ b/src/main/scripts/startMZmine_MacOSX.command @@ -16,6 +16,11 @@ TMP_FILE_DIRECTORY=/tmp # It is usually not necessary to modify the JAVA_COMMAND parameter, but if you like to run # a specific Java Virtual Machine, you may set the path to the java command of that JVM JAVA_COMMAND=`/usr/libexec/java_home -v 1.8+`/bin/java +if [ $? -ne 0 ]; then + echo "No JDK version 1.8+ found. Trying to use the current JRE." + JAVA_PLUGIN_DIR="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" + JAVA_COMMAND=${JAVA_PLUGIN_DIR}/Contents/Home/bin/java +fi # ******************************************** # You don't need to modify anything below here @@ -56,4 +61,4 @@ SCRIPTDIR=`dirname "$0"` cd "$SCRIPTDIR" # This command starts the Java Virtual Machine -echo "$JAVA_PARAMETERS" $MAIN_CLASS "$@" | xargs $JAVA_COMMAND \ No newline at end of file +echo "$JAVA_PARAMETERS" $MAIN_CLASS "$@" | xargs $JAVA_COMMAND