brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [1/4] brooklyn-dist git commit: use JAVA_HOME if available when starting up
Date Wed, 30 Mar 2016 09:11:58 GMT
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master d0609597b -> 9c3fdfe17


use JAVA_HOME if available when starting up


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/b1143068
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/b1143068
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/b1143068

Branch: refs/heads/master
Commit: b1143068148b7a69b10d553099df87ccf0409059
Parents: d060959
Author: Robert Moss <robert.moss@cloudsoftcorp.com>
Authored: Wed Mar 23 17:23:02 2016 +0000
Committer: Robert Moss <robert.moss@cloudsoftcorp.com>
Committed: Tue Mar 29 11:51:39 2016 +0100

----------------------------------------------------------------------
 dist/src/main/dist/bin/brooklyn | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/b1143068/dist/src/main/dist/bin/brooklyn
----------------------------------------------------------------------
diff --git a/dist/src/main/dist/bin/brooklyn b/dist/src/main/dist/bin/brooklyn
index 370bc93..5901aef 100755
--- a/dist/src/main/dist/bin/brooklyn
+++ b/dist/src/main/dist/bin/brooklyn
@@ -48,4 +48,10 @@ JAVA_OPTS="-Dbrooklyn.location.localhost.address=127.0.0.1 ${JAVA_OPTS}"
 
 # start Brooklyn
 echo $$ > "$ROOT/pid_java"
-exec java ${JAVA_OPTS} -cp "${INITIAL_CLASSPATH}" org.apache.brooklyn.cli.Main "$@"
+if [[ -n "$JAVA_HOME" && -d "$JAVA_HOME" ]] ; then
+	JAVACMD="$JAVA_HOME/bin/java"
+else
+	JAVACMD="java"
+fi
+
+exec $JAVACMD ${JAVA_OPTS} -cp "${INITIAL_CLASSPATH}" org.apache.brooklyn.cli.Main "$@"


Mime
View raw message