Index: src/gnu/gcjwebplugin/AppletViewer.java =================================================================== RCS file: /cvsroot/gcjwebplugin/gcjwebplugin/src/gnu/gcjwebplugin/AppletViewer.java,v retrieving revision 1.45 diff -u -r1.45 AppletViewer.java --- src/gnu/gcjwebplugin/AppletViewer.java 19 Apr 2006 18:40:06 -0000 1.45 +++ src/gnu/gcjwebplugin/AppletViewer.java 26 Apr 2006 19:35:08 -0000 @@ -52,23 +52,12 @@ private static ClassLoader getClassLoader(URL codebase, ArrayList archives) { - // Ask cache for existing class loader. - AppletClassLoader loader = (AppletClassLoader) classLoaderCache.get(codebase); + // Ask cache for class loader. + // Should load class loader each time. It is possible that there + // are more than one applet to be loaded with different archives. + AppletClassLoader loader = new AppletClassLoader(codebase, archives); + classLoaderCache.put(codebase, loader); - if (loader == null) - { - // FIXME: why does URLClassLoader throw a NoClassDefFoundError - // when the html file we pass it is in the current working - // directory? (e.g. the Slime Volleyball applet). I suspect - // a URLClassLoader bug in libgcj. - - // XXX: Add archives only the first time we see a codebase ... - loader = new AppletClassLoader(codebase, archives); - - // Add new class loader to cache. - classLoaderCache.put(codebase, loader); - } - return loader; }