From 0b38becc8ddeb3026d5fa0ca89713cb3e38ac430 Mon Sep 17 00:00:00 2001 From: Deepak Bhole Date: Fri, 4 Mar 2011 17:34:32 -0500 Subject: - PR475, RH604061: Allow applets from the same page to use the same classloader --- plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'plugin/icedteanp') diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java index 38b8b96..bd3637f 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java @@ -1646,7 +1646,14 @@ public class PluginAppletViewer extends XEmbeddedFrame { public void run() { - ThreadGroup tg = ((JNLPClassLoader) p.applet.getClass().getClassLoader()).getApplication().getThreadGroup(); + ClassLoader cl = p.applet.getClass().getClassLoader(); + + // Since we want to deal with JNLPClassLoader, extract it if this + // is a codebase loader + if (cl instanceof JNLPClassLoader.CodeBaseClassLoader) + cl = ((JNLPClassLoader.CodeBaseClassLoader) cl).getParentJNLPClassLoader(); + + ThreadGroup tg = ((JNLPClassLoader) cl).getApplication().getThreadGroup(); appletShutdown(p); appletPanels.removeElement(p); -- cgit v1.2.3