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:
hns 2003-09-16 15:30:53 +00:00
parent e6959610db
commit a2dfb6a9b9
3 changed files with 15 additions and 15 deletions

View file

@ -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

View file

@ -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
View file

@ -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