* Unify check for JAVA_HOME and JAVACMD executable. The latter didn't work on Mac OS X.
This commit is contained in:
parent
e7a7969e9d
commit
412ba832d2
1 changed files with 5 additions and 7 deletions
12
start.sh
12
start.sh
|
@ -28,17 +28,15 @@ HTTP_PORT=8080
|
||||||
# must be contained in PATH variable.
|
# must be contained in PATH variable.
|
||||||
if [ "$JAVA_HOME" ]; then
|
if [ "$JAVA_HOME" ]; then
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
# Check if java command is executable
|
||||||
|
if [ ! -x $JAVACMD ]; then
|
||||||
|
echo "Warning: JAVA_HOME variable may be set incorrectly:"
|
||||||
|
echo " No executable found at $JAVACMD"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# If JAVA_HOME is set, check if java command is executable
|
|
||||||
if [ $JAVA_HOME -a ! -x $JAVACMD ] ; then
|
|
||||||
echo "Warning: JAVA_HOME variable may be set incorrectly:"
|
|
||||||
echo " No executable found at $JAVACMD"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get the Helma installation directory
|
# Get the Helma installation directory
|
||||||
INSTALL_DIR="${0%/*}"
|
INSTALL_DIR="${0%/*}"
|
||||||
cd $INSTALL_DIR
|
cd $INSTALL_DIR
|
||||||
|
|
Loading…
Add table
Reference in a new issue