Skip to content

Commit

Permalink
Adding JAVA_HOME usage within marathon framework.
Browse files Browse the repository at this point in the history
This would allow to start marathon using the non-default jdk.
Particularly useful to work around issue 1763
#1763

Change-Id: I101c9a17fa38e6b88ca562d75bb02b2c1c557279
  • Loading branch information
Sebastien Le Digabel authored and aquamatthias committed Sep 28, 2015
1 parent 96cd189 commit 4507942
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/marathon-framework
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ function run_jar {
vm_opts+=( ${j_opt} )
done
# TODO: Set main class in pom.xml and use -jar
exec java "${vm_opts[@]}" -cp "$marathon_jar" mesosphere.marathon.Main "$@"
if [ -n "$JAVA_HOME" ]
then
JAVA_BIN="$JAVA_HOME/bin/java"
else
JAVA_BIN="java"
fi
exec $JAVA_BIN "${vm_opts[@]}" -cp "$marathon_jar" mesosphere.marathon.Main "$@"
}

function logged {
Expand Down

0 comments on commit 4507942

Please sign in to comment.