diff --git a/distribution/bin/runbroker.sh b/distribution/bin/runbroker.sh index e701e6c3200..5bb3872ef48 100644 --- a/distribution/bin/runbroker.sh +++ b/distribution/bin/runbroker.sh @@ -26,12 +26,11 @@ error_exit () find_java_home() { + if [ -n "$JAVA_HOME" ]; then + return + fi 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 2a5184d9f8f..99f31eb5fd8 100644 --- a/distribution/bin/runserver.sh +++ b/distribution/bin/runserver.sh @@ -26,12 +26,11 @@ error_exit () find_java_home() { + if [ -n "$JAVA_HOME" ]; then + return + fi 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 9b1e1d804df..96d7d1c7f9b 100644 --- a/distribution/bin/tools.sh +++ b/distribution/bin/tools.sh @@ -27,7 +27,6 @@ error_exit () find_java_home() { if [ -n "$JAVA_HOME" ]; then - JAVA_HOME=$JAVA_HOME return fi case "`uname`" in