Only check for executable bin/java if JAVA_HOME is set, and if it isn't found,
don't exit but just issue a warning and let the script go on.
This commit is contained in:
parent
e6959610db
commit
a2dfb6a9b9
3 changed files with 15 additions and 15 deletions
|
@ -32,11 +32,11 @@ else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if java command is executable
|
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
# If JAVA_HOME is set, check if java command is executable
|
||||||
echo "Error: JAVA_HOME is not defined correctly."
|
if [ $JAVA_HOME -a ! -x $JAVACMD ] ; then
|
||||||
echo " We cannot execute $JAVACMD"
|
echo "Warning: JAVA_HOME variable may be set incorrectly:"
|
||||||
exit
|
echo " No executable found at $JAVACMD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the Helma installation directory
|
# Get the Helma installation directory
|
||||||
|
|
|
@ -32,11 +32,11 @@ else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if java command is executable
|
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
# If JAVA_HOME is set, check if java command is executable
|
||||||
echo "Error: JAVA_HOME is not defined correctly."
|
if [ $JAVA_HOME -a ! -x $JAVACMD ] ; then
|
||||||
echo " We cannot execute $JAVACMD"
|
echo "Warning: JAVA_HOME variable may be set incorrectly:"
|
||||||
exit
|
echo " No executable found at $JAVACMD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the Helma installation directory
|
# Get the Helma installation directory
|
||||||
|
|
10
hop.sh
10
hop.sh
|
@ -32,11 +32,11 @@ else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if java command is executable
|
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
# If JAVA_HOME is set, check if java command is executable
|
||||||
echo "Error: JAVA_HOME is not defined correctly."
|
if [ $JAVA_HOME -a ! -x $JAVACMD ] ; then
|
||||||
echo " We cannot execute $JAVACMD"
|
echo "Warning: JAVA_HOME variable may be set incorrectly:"
|
||||||
exit
|
echo " No executable found at $JAVACMD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the Helma installation directory
|
# Get the Helma installation directory
|
||||||
|
|
Loading…
Add table
Reference in a new issue