aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge')
-rw-r--r--netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java22
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java1
2 files changed, 22 insertions, 1 deletions
diff --git a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
index 8261749..0d4875b 100644
--- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
+++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
@@ -209,6 +209,12 @@ public final class DeploymentConfiguration {
sm.checkRead(userFile.toString());
}
+ File systemConfigFile = findSystemConfigFile();
+
+ load(systemConfigFile, userFile, fixIssues);
+ }
+
+ void load(File systemConfigFile, File userFile, boolean fixIssues) throws ConfigurationException {
Map<String, Setting<String>> initialProperties = Defaults.getDefaults();
Map<String, Setting<String>> systemProperties = null;
@@ -218,7 +224,6 @@ public final class DeploymentConfiguration {
* there is a system-level deployment.poperties file
*/
- File systemConfigFile = findSystemConfigFile();
if (systemConfigFile != null) {
if (loadSystemConfiguration(systemConfigFile)) {
if (JNLPRuntime.isDebug()) {
@@ -257,6 +262,21 @@ public final class DeploymentConfiguration {
}
/**
+ * Copies the current configuration into the target
+ */
+ public void copyTo(Properties target) {
+ Set<String> names = getAllPropertyNames();
+
+ for (String name : names) {
+ String value = getProperty(name);
+ // for Properties, missing and null are identical
+ if (value != null) {
+ target.setProperty(name, value);
+ }
+ }
+ }
+
+ /**
* Get the value for the given key
*
* @param key the property key
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
index 113e51b..fedf918 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
@@ -184,6 +184,7 @@ public class JNLPRuntime {
try {
config.load();
+ config.copyTo(System.getProperties());
} catch (ConfigurationException e) {
/* exit if there is a fatal exception loading the configuration */
if (isApplication) {