diff options
author | Jiri Vanek <[email protected]> | 2013-04-04 11:20:09 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-04-04 11:20:09 +0200 |
commit | 631606031378c1211a45743b427b7ccce84e7cc0 (patch) | |
tree | 628694814267af3550ecc1676f13dc33c453b916 /launcher | |
parent | 328f56a9054cf4da46d267825ca175f710fb53a4 (diff) |
Plugin is now honoring the custom jre
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/itweb-settings.in | 9 | ||||
-rw-r--r-- | launcher/javaws.in | 13 |
2 files changed, 16 insertions, 6 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} \ diff --git a/launcher/javaws.in b/launcher/javaws.in index 300672c..b7352c8 100644 --- a/launcher/javaws.in +++ b/launcher/javaws.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh JAVA=@JAVA@ LAUNCHER_BOOTCLASSPATH=@LAUNCHER_BOOTCLASSPATH@ @@ -9,14 +9,19 @@ SPLASH_LOCATION=@JAVAWS_SPLASH_LOCATION@ PROGRAM_NAME=javaws CP=@JRE@/lib/rt.jar -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 - CP=$CUSTOM_JRE/lib/rt.jar + if [ -d "$CUSTOM_JRE" -a -f "$CUSTOM_JRE/bin/java" -a -f "$CUSTOM_JRE/lib/rt.jar" ] ; then + JAVA=$CUSTOM_JRE/bin/java + CP=$CUSTOM_JRE/lib/rt.jar + else + echo "Your custom JRE $CUSTOM_JRE read from deployment.properties under key $PROPERTY_NAME as $CUSTOM_JRE is not valid. Using default ($JAVA, $CP) in attempt to start. Please fix this." + fi fi; JAVA_ARGS=( ) |