diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-06-27 22:16:40 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-06-27 22:16:40 -0700 |
commit | 4974b658edf2716ff3c6f2e6863cddb2a4ddf891 (patch) | |
tree | 4de6c75351ae921e1bcc09a8ba0a27871686fad4 /run | |
parent | aea727f68d5fe5e81fc04ece97ad94c6f12c7270 (diff) | |
download | spark-4974b658edf2716ff3c6f2e6863cddb2a4ddf891.tar.gz spark-4974b658edf2716ff3c6f2e6863cddb2a4ddf891.tar.bz2 spark-4974b658edf2716ff3c6f2e6863cddb2a4ddf891.zip |
Look at JAVA_HOME before PATH to determine Java executable
Diffstat (limited to 'run')
-rwxr-xr-x | run | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -67,14 +67,15 @@ if [ "$SPARK_LAUNCH_WITH_SCALA" == "1" ]; then fi fi else - if [ `command -v java` ]; then - RUNNER="java" + if [ -n "${JAVA_HOME}" ]; then + RUNNER="${JAVA_HOME}/bin/java" else - if [ -z "$JAVA_HOME" ]; then + if [ `command -v java` ]; then + RUNNER="java" + else echo "JAVA_HOME is not set" >&2 exit 1 fi - RUNNER="${JAVA_HOME}/bin/java" fi if [ -z "$SCALA_LIBRARY_PATH" ]; then if [ -z "$SCALA_HOME" ]; then |