diff options
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java index 31e6b06..2484df6 100644 --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java @@ -25,6 +25,7 @@ import java.util.*; import java.util.List; import java.security.*; import javax.jnlp.*; +import javax.naming.ConfigurationException; import javax.swing.UIManager; import net.sourceforge.jnlp.*; @@ -59,6 +60,8 @@ public class JNLPRuntime { /** the localized resource strings */ private static ResourceBundle resources; + private static final DeploymentConfiguration config = new DeploymentConfiguration(); + /** the security manager */ private static JNLPSecurityManager security; @@ -183,6 +186,16 @@ public class JNLPRuntime { public static void initialize(boolean isApplication) throws IllegalStateException { checkInitialized(); + try { + config.load(); + } catch (ConfigurationException e) { + /* exit if there is a fatal exception loading the configuration */ + if (isApplication) { + System.out.println(getMessage("RConfigurationError")); + System.exit(1); + } + } + isWebstartApplication = isApplication; //Setting the system property for javawebstart's version. @@ -227,6 +240,7 @@ public class JNLPRuntime { securityDialogMessageHandler = startSecurityThreads(); initialized = true; + } /** @@ -247,6 +261,15 @@ public class JNLPRuntime { } /** + * Gets the Configuration associated with this runtime + * @return a {@link DeploymentConfiguration} object that can be queried to + * find relevant configuration settings + */ + public static DeploymentConfiguration getConfiguration() { + return config; + } + + /** * Returns true if a webstart application has been initialized, and false * for a plugin applet. */ |