diff --git a/netx/net/sourceforge/jnlp/PluginBridge.java b/netx/net/sourceforge/jnlp/PluginBridge.java --- a/netx/net/sourceforge/jnlp/PluginBridge.java +++ b/netx/net/sourceforge/jnlp/PluginBridge.java @@ -26,19 +26,19 @@ import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; -import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Locale; -import java.util.List; -import java.util.ArrayList; import java.util.Map; import java.util.Set; +import net.sourceforge.jnlp.runtime.JNLPRuntime; import sun.misc.BASE64Decoder; -import net.sourceforge.jnlp.runtime.JNLPRuntime; - /** * Allows reuse of code that expects a JNLPFile object, * while overriding behaviour specific to applets. @@ -47,6 +47,7 @@ public class PluginBridge extends JNLPFi private PluginParameters params; private Set jars = new HashSet(); + private List extensionJars; //Folders can be added to the code-base through the archive tag private List codeBaseFolders = new ArrayList(); private String[] cacheJars = new String[0]; @@ -121,6 +122,9 @@ public class PluginBridge extends JNLPFi String fileName = jarDesc.getLocation().toExternalForm(); this.jars.add(fileName); } + + // Store any extensions listed in the JNLP file to be returned later on, namely in getResources() + extensionJars = Arrays.asList(jnlpFile.getResources().getExtensions()); } catch (MalformedURLException e) { // Don't fail because we cannot get the jnlp file. Parameters are optional not required. // it is the site developer who should ensure that file exist. @@ -307,6 +311,8 @@ public class PluginBridge extends JNLPFi return result; } catch (MalformedURLException ex) { /* Ignored */ } + } else if (launchType.equals(ExtensionDesc.class)) { + return (List) extensionJars; } return sharedResources.getResources(launchType); }