aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/services/XBasicService.java
diff options
context:
space:
mode:
authorDeepak Bhole <[email protected]>2010-12-06 15:34:01 -0500
committerDeepak Bhole <[email protected]>2010-12-06 15:34:01 -0500
commit6ca1a9a369b10703da9af8f8a1ced0f3b02ae5c2 (patch)
tree568f8e454db94fa8abc896b46ce8cac7a9f3b74d /netx/net/sourceforge/jnlp/services/XBasicService.java
parent0d66adf24179c33bbdccaacc10d4c8a5f5e2cd54 (diff)
Fixed indentation and spacing for all .java files.
Added a new .settings directory which contains Eclipse preferences for code style.
Diffstat (limited to 'netx/net/sourceforge/jnlp/services/XBasicService.java')
-rw-r--r--netx/net/sourceforge/jnlp/services/XBasicService.java23
1 files changed, 9 insertions, 14 deletions
diff --git a/netx/net/sourceforge/jnlp/services/XBasicService.java b/netx/net/sourceforge/jnlp/services/XBasicService.java
index a46a309..124025c 100644
--- a/netx/net/sourceforge/jnlp/services/XBasicService.java
+++ b/netx/net/sourceforge/jnlp/services/XBasicService.java
@@ -14,7 +14,6 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
package net.sourceforge.jnlp.services;
import java.io.IOException;
@@ -48,7 +47,6 @@ class XBasicService implements BasicService {
/** whether the command was loaded / prompted for */
private boolean initialized = false;
-
protected XBasicService() {
}
@@ -128,7 +126,7 @@ class XBasicService implements BasicService {
}
JARDesc[] jarDescs = jnlpFile.getResources().getJARs();
- for (JARDesc jarDesc: jarDescs) {
+ for (JARDesc jarDesc : jarDescs) {
return jarDesc.getLocation();
}
}
@@ -159,15 +157,14 @@ class XBasicService implements BasicService {
*
* @return whether the document was opened
*/
- public boolean showDocument(URL url) {
+ public boolean showDocument(URL url) {
initialize();
if (url.toString().endsWith(".jnlp")) {
try {
new Launcher().launchExternal(url);
return true;
- }
- catch (Exception ex) {
+ } catch (Exception ex) {
return false;
}
}
@@ -181,8 +178,7 @@ class XBasicService implements BasicService {
//Runtime.getRuntime().exec(new String[]{command,url.toString()});
return true;
- }
- catch(IOException ex){
+ } catch (IOException ex) {
if (JNLPRuntime.isDebug())
ex.printStackTrace();
}
@@ -196,17 +192,16 @@ class XBasicService implements BasicService {
return;
initialized = true;
- if(isWindows()) {
+ if (isWindows()) {
command = "rundll32 url.dll,FileProtocolHandler ";
- }
- else {
+ } else {
DeploymentConfiguration config = JNLPRuntime.getConfiguration();
command = config.getProperty(DeploymentConfiguration.KEY_BROWSER_PATH);
- if(command == null) { // prompt & store
+ if (command == null) { // prompt & store
command = promptForCommand(null);
- if(command != null) {
+ if (command != null) {
config.setProperty(DeploymentConfiguration.KEY_BROWSER_PATH, command);
try {
config.save();
@@ -220,7 +215,7 @@ class XBasicService implements BasicService {
private boolean isWindows() {
String os = System.getProperty("os.name");
- if(os != null && os.startsWith("Windows"))
+ if (os != null && os.startsWith("Windows"))
return true;
else
return false;