Skip to content
Snippets Groups Projects
Commit 4974b658 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Look at JAVA_HOME before PATH to determine Java executable

parent aea727f6
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment