diff options
author | Omair Majid <[email protected]> | 2010-11-10 16:20:51 -0500 |
---|---|---|
committer | Omair Majid <[email protected]> | 2010-11-10 16:20:51 -0500 |
commit | 1f3bdce4f5d05c89f7f7a8ee53f0bbbc0098c963 (patch) | |
tree | 2ae4d8598c05bbcf0b4845aee80a2ffd2d7d479d /netx/net/sourceforge/jnlp/services | |
parent | 6a451aa7ebf76df590247b90065a4cac6bb7cf3e (diff) |
use browser path from configuration
2010-11-05 Omair Majid <[email protected]>
* netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java:
Add KEY_BROWSER_PATH.
(loadDefaultProperties): Use KEY_BROWSER_PATH.
* netx/net/sourceforge/jnlp/services/XBasicService.java
(initialize): Use the browser command from the configuration.
Save updates to configuration as well.
Diffstat (limited to 'netx/net/sourceforge/jnlp/services')
-rw-r--r-- | netx/net/sourceforge/jnlp/services/XBasicService.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/netx/net/sourceforge/jnlp/services/XBasicService.java b/netx/net/sourceforge/jnlp/services/XBasicService.java index a7ef906..a46a309 100644 --- a/netx/net/sourceforge/jnlp/services/XBasicService.java +++ b/netx/net/sourceforge/jnlp/services/XBasicService.java @@ -30,6 +30,7 @@ import net.sourceforge.jnlp.JARDesc; import net.sourceforge.jnlp.JNLPFile; import net.sourceforge.jnlp.Launcher; import net.sourceforge.jnlp.runtime.ApplicationInstance; +import net.sourceforge.jnlp.runtime.DeploymentConfiguration; import net.sourceforge.jnlp.runtime.JNLPRuntime; import net.sourceforge.jnlp.util.PropertiesFile; @@ -199,15 +200,19 @@ class XBasicService implements BasicService { command = "rundll32 url.dll,FileProtocolHandler "; } else { - PropertiesFile props = JNLPRuntime.getProperties(); - command = props.getProperty("browser.command"); + DeploymentConfiguration config = JNLPRuntime.getConfiguration(); + command = config.getProperty(DeploymentConfiguration.KEY_BROWSER_PATH); if(command == null) { // prompt & store command = promptForCommand(null); if(command != null) { - props.setProperty("browser.command", command); - props.store(); + config.setProperty(DeploymentConfiguration.KEY_BROWSER_PATH, command); + try { + config.save(); + } catch (IOException e) { + e.printStackTrace(); + } } } } |