This content has been marked as final. Show 4 replies
Thanks for your reply, Chuck. Unfortunately, I don't think this helps. I had not seen the specific page you provided a link for, but I had seen a similar one:
The problem is that, with the child browser window running in a separate process, I suspect there are two "headless" JVMs (one in the parent, one in the child) that are probably unaware of each other, and run applets in JVMs accessible only to the "headless" JVM that created them.
On this page ( [http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_execution.html] ), under section 'Class Loader Cache and Interaction Between Applets', Sun says: "Normally, if two applets have the same codebase and archive parameters, they will be loaded by the same class loader instance. This behavior is required for backward compatibility, and is relied on by several real-world applications. The result is that multiple applets on the same web page may access each others' static variables at the Java language level, effectively allowing the multiple applets to be written as though they comprised a single application." Well, mine is one of those 'real world' applications that relies on this behavior, but unfortunately, it doesn't seem to hold when the windows are running in separate windows/processes (which is the case in IE8, but not in earlier versions).
On this page ( http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html#CLASSLOADER_CACHE), at the end of the java_arguments section, Sun says: "There is no way to "name" a JVM instance used to launch a particular applet and "force" subsequent applets into that JVM instance." That is probably the exact feature I need, and don't have. Am I missing something? Is there some option I'm unaware of? Any ideas would be greatly appreciated!
Consider using Liveconnect to exchange data between different instances through the browser.
Use of static classes is not reliable as your other applet may be launched in some other VM for many reasons
and not only in IE8. It simply happens rarely in your dev environemnt but if users are using other java applets then
it could be very different.