This discussion is archived
4 Replies Latest reply: Sep 21, 2010 11:39 PM by 800773 RSS

IE8 running child windows in separate processes causes applet failures

843802 Newbie
Currently Being Moderated
Microsoft, in IE8, has implemented what they call LCIE (Loosely-Coupled Internet Explorer). This new architecture allows the browser to run tabs/windows in separate processes. My application has an applet that runs in the main browser window. It may open one or more child windows, each of which runs another instance of the applet. These applets communicate via static class data. In IE7, this works fine, because the main window and child windows run in the same process and under a single JVM. In IE8, each child window may be running in a separate process from the main window, each with its own JVM, which means the static data is no longer "shared memory", and the applets can no longer communicate.

Is there a way to force the plugin to run all instances of an applet in a single JVM?
  • 1. Re: IE8 running child windows in separate processes causes applet failures
    796365 Newbie
    Currently Being Moderated
    I know nothing re the IE8 feature, but Java 6u10 (and on) can run applets in separate processes, or all in the same one (JRE). I assume that this applies to your situation. Here's the documentation:

    [http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_execution.html]
  • 2. Re: IE8 running child windows in separate processes causes applet failures
    843802 Newbie
    Currently Being Moderated
    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:

    [http://java.sun.com/developer/technicalArticles/javase/newapplets/]

    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!
  • 3. Re: IE8 running child windows in separate processes causes applet failures
    843802 Newbie
    Currently Being Moderated
    Recently I shifted my application from IE 6 to IE 8 and facing the same problem. Howver after loading IE8 path 'KB982381' problem goes away. After loading this path, main window and child windows are running in the same process and under a single JVM. Please try and confirm.
  • 4. Re: IE8 running child windows in separate processes causes applet failures
    800773 Newbie
    Currently Being Moderated
    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.