I think that I have found a bug in
Java itself, not a browser bug, regarding the Object tag, the '
archive' attribute of the Object tag, and the archive attribute's interaction with Java's internal AppletClassLoader.
I think a little background detail is needed here. Java
applets were first embeded into web pages with the APPLET tag and the "
archive" attribute on the APPLET tag was a
comma-separated list -- this part is important! The replacement for APPLET is supposed to be the Object tag which also has an "archive" attribute but this version of the "archive" attribute takes a
space-separated list of values.
So, to the bug, I open the Java Console, trigger logging mode, set trace to level 5, and then open a page with an applet, embeded with the Object tag, using the attribute:
(the full version is found below).
This is what appears in the Java Console using Object's version of the archive attribute:
Plugin2ClassLoader.addURL parent called for file:/C:/Desktop/applet/applet/myApplet.class archive1.jar archive2.jar
-- Java thinks it has a single file name: "myApplet.class archive1.jar archive2.jar"
-- Java should have seen three files and cached at least two (the jar files):
1 myApplet.class
2 archive1.jar
3 archive2.jar
Okay, so then, after that, I added a Param tag, formatted using a
comma-separated list, just like the APPLET tag uses:
Java's new output:
Plugin2ClassLoader.addURL parent called for file:/C:/Desktop/applet/applet/archive1.jar
Plugin2ClassLoader.addURL parent called for file:/C:/Desktop/applet/applet/archive2.jar
Now it works. Java's applet class loader found the jar files and called them.
So, it appears, that Java's internal class loader is broken -- it only takes a comma-separated list for reading an archive attribute's value. This conflicts with Object's specification of the archive tag which is space-separated. Yet what happens is that Java can't read Object's archive attribute correctly if its longer than 1 item long because Java only reads comma-separated lists of archives.
Run using Java Plug-in 1.6.0_32, that's Java SE 1.6.0_32 release (the current latest version from
http://www.java.com).
Just so you know, if you try to recreate this, this is how I sorted my File Locations:
C:\Desktop\applet -- where the html file using the Object tag is located.
C:\Desktop\applet\applet -- where the applet's *.class and .jar files are located.
The full object code (and this was intentionally made verbose for maximum use and browser support) (Note: the code is html 4.01 not xhtml, so remember to close the param tags with slash-bracket "/>" if you copy this code into an xhtml file):