aboutsummaryrefslogtreecommitdiffstats
path: root/launcher
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-03-21 18:14:53 +0100
committerJiri Vanek <[email protected]>2013-03-21 18:14:53 +0100
commit801416024f13b7a29fcf4b8977bc1d4b4818934b (patch)
treef8527ef257c22bbb421c1a7fd38fc489bbd03fbe /launcher
parente5d268d91f8111fc3c8a7a68b09472f608cdfbae (diff)
Launchers made aware of custom set JRE
* luncher/itweb-settings.in: * launcher/javaws.in: are now scanning ~/.icedtea/deployment.properties and /etc/.java/.deploy/deployment.properties for deployment.jre.dir property. If found, then its java and rt.jar are used to launch applications.
Diffstat (limited to 'launcher')
-rw-r--r--launcher/itweb-settings.in9
-rw-r--r--launcher/javaws.in10
2 files changed, 19 insertions, 0 deletions
diff --git a/launcher/itweb-settings.in b/launcher/itweb-settings.in
index c7bb287..0b4e555 100644
--- a/launcher/itweb-settings.in
+++ b/launcher/itweb-settings.in
@@ -7,6 +7,15 @@ CLASSNAME=net.sourceforge.jnlp.controlpanel.CommandLine
BINARY_LOCATION=@ITWEB_SETTINGS_BIN_LOCATION@
PROGRAM_NAME=itweb-settings
+CUSTOM_JRE_REGEX="^deployment.jre.dir *= *"
+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
+fi;
+
${JAVA} ${LAUNCHER_BOOTCLASSPATH} ${LAUNCHER_FLAGS} \
-Dicedtea-web.bin.name=${PROGRAM_NAME} \
-Dicedtea-web.bin.location=${BINARY_LOCATION} \
diff --git a/launcher/javaws.in b/launcher/javaws.in
index ae9a24d..300672c 100644
--- a/launcher/javaws.in
+++ b/launcher/javaws.in
@@ -9,6 +9,16 @@ SPLASH_LOCATION=@JAVAWS_SPLASH_LOCATION@
PROGRAM_NAME=javaws
CP=@JRE@/lib/rt.jar
+CUSTOM_JRE_REGEX="^deployment.jre.dir *= *"
+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
+fi;
+
JAVA_ARGS=( )
ARGS=( )
COMMAND=()