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
|
||||
fi
|
||||
|
||||
# Check if java command is executable
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly."
|
||||
echo " We cannot execute $JAVACMD"
|
||||
exit
|
||||
|
||||
# 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
|
||||
|
|
|
@ -32,11 +32,11 @@ else
|
|||
JAVACMD=java
|
||||
fi
|
||||
|
||||
# Check if java command is executable
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly."
|
||||
echo " We cannot execute $JAVACMD"
|
||||
exit
|
||||
|
||||
# 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
|
||||
|
|
10
hop.sh
10
hop.sh
|
@ -32,11 +32,11 @@ else
|
|||
JAVACMD=java
|
||||
fi
|
||||
|
||||
# Check if java command is executable
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly."
|
||||
echo " We cannot execute $JAVACMD"
|
||||
exit
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Add table
Reference in a new issue