Skip to content

Commit

Permalink
Use JAVA_HOME if set. Closes GH-83
Browse files Browse the repository at this point in the history
  • Loading branch information
hrj committed Jun 24, 2016
1 parent 6a1d3eb commit dca4766
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
7 changes: 6 additions & 1 deletion tools/abandon_cli.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@ECHO OFF
SET BASEDIR=%~dp0
SET JAVA_CMD=java

java -jar "%BASEDIR%\start.jar" %*
if not "%JAVA_HOME%" == "" (
SET JAVA_CMD="%JAVA_HOME%\bin\java"
)

"%JAVA_CMD%" -jar "%BASEDIR%\start.jar" %*
9 changes: 8 additions & 1 deletion tools/abandon_cli.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
JAVA_CMD=java

if [ $JAVA_HOME ]
then
JAVA_CMD=$JAVA_HOME/bin/java;
fi

BASEDIR=`dirname $0`

java -jar ${BASEDIR}/start.jar $*
$JAVA_CMD -jar ${BASEDIR}/start.jar $*
8 changes: 7 additions & 1 deletion tools/abandon_gui.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
@ECHO OFF
SET BASEDIR=%~dp0

java -jar "%BASEDIR%\start.jar" -g %*
SET JAVA_CMD=java

if not "%JAVA_HOME%" == "" (
SET JAVA_CMD="%JAVA_HOME%\bin\java"
)

"%JAVA_CMD%" -jar "%BASEDIR%\start.jar" -g %*
9 changes: 8 additions & 1 deletion tools/abandon_gui.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
JAVA_CMD=java

if [ $JAVA_HOME ]
then
JAVA_CMD=$JAVA_HOME/bin/java;
fi

BASEDIR=`dirname $0`

java -jar ${BASEDIR}/start.jar -g $*
$JAVA_CMD -jar ${BASEDIR}/start.jar -g $*

0 comments on commit dca4766

Please sign in to comment.