diff --git a/distribution/bin/runbroker.sh b/distribution/bin/runbroker.sh index da1aa9f7352..0b2a70ff664 100644 --- a/distribution/bin/runbroker.sh +++ b/distribution/bin/runbroker.sh @@ -28,6 +28,10 @@ find_java_home() { case "`uname`" in Darwin) + if [ -n "$JAVA_HOME" ]; then + JAVA_HOME=$JAVA_HOME + return + fi JAVA_HOME=$(/usr/libexec/java_home) ;; *) diff --git a/distribution/bin/runserver.sh b/distribution/bin/runserver.sh index 0f8b5b3e51b..c30e1e5736a 100644 --- a/distribution/bin/runserver.sh +++ b/distribution/bin/runserver.sh @@ -28,6 +28,10 @@ find_java_home() { case "`uname`" in Darwin) + if [ -n "$JAVA_HOME" ]; then + JAVA_HOME=$JAVA_HOME + return + fi JAVA_HOME=$(/usr/libexec/java_home) ;; *) diff --git a/distribution/bin/tools.sh b/distribution/bin/tools.sh index 17207703ab7..bd3a4dd3897 100644 --- a/distribution/bin/tools.sh +++ b/distribution/bin/tools.sh @@ -28,6 +28,10 @@ find_java_home() { case "`uname`" in Darwin) + if [ -n "$JAVA_HOME" ]; then + JAVA_HOME=$JAVA_HOME + return + fi JAVA_HOME=$(/usr/libexec/java_home) ;; *)