diff options
author | dlila <devnull@localhost> | 2011-03-25 14:23:28 -0400 |
---|---|---|
committer | dlila <devnull@localhost> | 2011-03-25 14:23:28 -0400 |
commit | 46f73ee707976028a9e9bfb4f96138d704b31185 (patch) | |
tree | a3b29503f13e06b7178b8a7575fe46b588e462b8 /netx/net/sourceforge/jnlp/Launcher.java | |
parent | 7d6ec16b33a835571fbce609c0611733e620055f (diff) |
Implement codebase_lookup=false.
Diffstat (limited to 'netx/net/sourceforge/jnlp/Launcher.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/Launcher.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/netx/net/sourceforge/jnlp/Launcher.java b/netx/net/sourceforge/jnlp/Launcher.java index 09212b8..531e282 100644 --- a/netx/net/sourceforge/jnlp/Launcher.java +++ b/netx/net/sourceforge/jnlp/Launcher.java @@ -563,8 +563,11 @@ public class Launcher { try { JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy); - if (enableCodeBase || file.getResources().getJARs().length == 0) + if (enableCodeBase) { loader.enableCodeBase(); + } else if (file.getResources().getJARs().length == 0) { + throw new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later"); + } AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup(); @@ -603,8 +606,11 @@ public class Launcher { try { JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy); - if (enableCodeBase || file.getResources().getJARs().length == 0) + if (enableCodeBase) { loader.enableCodeBase(); + } else if (file.getResources().getJARs().length == 0) { + throw new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later"); + } String appletName = file.getApplet().getMainClass(); @@ -742,7 +748,7 @@ public class Launcher { if (isPlugin) { // Do not display download indicators if we're using gcjwebplugin. JNLPRuntime.setDefaultDownloadIndicator(null); - application = getApplet(file, true, cont); + application = getApplet(file, ((PluginBridge)file).codeBaseLookup(), cont); } else { if (file.isApplication()) application = launchApplication(file); |