From 46f73ee707976028a9e9bfb4f96138d704b31185 Mon Sep 17 00:00:00 2001 From: dlila Date: Fri, 25 Mar 2011 14:23:28 -0400 Subject: Implement codebase_lookup=false. --- netx/net/sourceforge/jnlp/Launcher.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'netx/net/sourceforge/jnlp/Launcher.java') 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); -- cgit v1.2.3