diff options
Diffstat (limited to 'launcher/itweb-settings.in')
-rw-r--r-- | launcher/itweb-settings.in | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/launcher/itweb-settings.in b/launcher/itweb-settings.in index 0b4e555..b719ec3 100644 --- a/launcher/itweb-settings.in +++ b/launcher/itweb-settings.in @@ -7,13 +7,18 @@ CLASSNAME=net.sourceforge.jnlp.controlpanel.CommandLine BINARY_LOCATION=@ITWEB_SETTINGS_BIN_LOCATION@ PROGRAM_NAME=itweb-settings -CUSTOM_JRE_REGEX="^deployment.jre.dir *= *" +PROPERTY_NAME=deployment.jre.dir +CUSTOM_JRE_REGEX="^$PROPERTY_NAME *= *" CUSTOM_JRE=`grep "$CUSTOM_JRE_REGEX" ~/.icedtea/deployment.properties 2>/dev/null | sed "s/$CUSTOM_JRE_REGEX//g"` if [ "x$CUSTOM_JRE" = "x" ] ; then CUSTOM_JRE=`grep "$CUSTOM_JRE_REGEX" /etc/.java/.deploy/deployment.properties 2>/dev/null | sed "s/$CUSTOM_JRE_REGEX//g"` fi; if [ "x$CUSTOM_JRE" != "x" ] ; then - JAVA=$CUSTOM_JRE/bin/java + if [ -d "$CUSTOM_JRE" -a -f "$CUSTOM_JRE/bin/java" ] ; then + JAVA=$CUSTOM_JRE/bin/java + else + echo "Your custom JRE $CUSTOM_JRE read from deployment.properties under key $PROPERTY_NAME as $CUSTOM_JRE is not valid. Using default ($JAVA) in attempt to start. Please fix this." + fi fi; ${JAVA} ${LAUNCHER_BOOTCLASSPATH} ${LAUNCHER_FLAGS} \ |