Skip to content

Commit

Permalink
Issue skhatri#25: Adding capability to set JAVA_HOME for jvm in use
Browse files Browse the repository at this point in the history
  • Loading branch information
techieBrandon committed Sep 14, 2016
1 parent a6d1d50 commit 369cad2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sonar-runner-2.4/bin/sonar-runner
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,18 @@ if [ -z "$SONAR_RUNNER_HOME" ] ; then
SONAR_RUNNER_HOME=`cd "$SONAR_RUNNER_HOME" && pwd`
fi

if [ ! -z "$JAVA_HOME" ] ; then
JAVA_CMD="$JAVA_HOME/bin/java"
else
JAVA_CMD="`which java`"
fi

# check that the SONAR_RUNNER_HOME has been correctly set
if [ ! -f "$SONAR_RUNNER_HOME/lib/sonar-runner-dist-2.4.jar" ] ; then
echo '$SONAR_RUNNER_HOME' does not point to a valid installation directory: $SONAR_RUNNER_HOME
exit 1
fi

JAVA_CMD="`which java`"
JAR_FILE="${SONAR_RUNNER_HOME}"/lib/sonar-runner-dist-2.4.jar
PROJECT_HOME=`pwd`

Expand Down

0 comments on commit 369cad2

Please sign in to comment.