简体   繁体   中英

Java applet fails in java7 on page load/reload in IE9

I am running an Applet in a web application (ASP.NET), deployment using deployJava.js . It worked/works fine on Java 6 u XX.

After the latest update to Java 7u5 I've run into an incomprehensible issue. On IE9 the Applet works fine, at first, but after any reloading (F5 or postback) the Applet simply freezes.

Java Plug-in 10.5.0.05
Using JRE version 1.7.0_05-b05 Java HotSpot(TM) Client VM
User home directory = C:\Users\***

basic: Starting applet teardown
basic: Finished applet teardown
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@2e749c
plugin2manager.parentwindowDispose

On Firefox and Chrome the Applet works fine. After downgrading the JRE version to 6 one, all browsers (including IE-9) work fine.

I've read a couple of Java/Oracle/IE9 tickets with the same problem and tried the prescribed work-around's but they haven't helped:

BTW: After IE9 freezes I check the iexplorer.exe process and it picks up 130 - 180 Mb of RAM. After deleting this process, iexplorer.exe reloads and works fine until the next browser/applet reload.

Please ask for more details if I'm not making myself clear enough. Thanks.

Could anyone helps me to resolve IE9&Java7 issue?

We had the same problems in IE9, and were able to fix those by using the "object"-Tag instead of "applet", and force IE9 into IE9-document-mode through a X-UA meta tag in the HTML header. This both fixed stability problems with the Java6- and the latest Java7 runtimes.

We have seen this identical behavior with several of our Java applets.

This issue was actually introduced in Java 7u4 and continues into 7u5.

Even worse... the culprit appears to be the Java Plugin itself... so disabling 7u5 and enabling 6uXX isn't enough to address the issue. You must uninstall Java 7.

Basically we are seeing two issues:

  • Applet simply not loading at all on the nth load attempt
  • Browser deadlock

We have entered a bug with Oracle for this issue and have not received much of a response.

The issue can easily be reproduced with Oracle's own Java Test Applet:

http://www.java.com/en/download/testjava.jsp

Here is the bug we have entered. Have you entered one as well?

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7176027

This is a fairly catastrophic issue for our products/customers.

If/when you enter a bug report with Oracle, please reference the bug above as well!

I was having all those problems with our Applet, too -- and only with IE9 and Java 7. None of the suggestions I found online gave any improvement.

Fortunately, somebody at Oracle must have been listening to all the complaints. Java 7 Update 6 became the default JRE download on 22 August 2012, and our Applet works fine now -- even without all the "fixes" I put in.

I had this problem before. I don't understand why it happens but I solved it by using a different VM at each load:

var attributes = {
    code: '...',
    archive: '...',
    width: '...',
    height: '...',
    separate_jvm: true
};
var parameters = {
};
var version = '1.7';
deployJava.runApplet(attributes, parameters, version);

I know this is a really old question, but I think those of us who have this problem in an old system really need an answer. In my case I am not reloading anything, my applet is injected using javascript (deploy.js), but I think the same solution could work. So after trying lots of things during two days this is the solution I got working:

Load the Applet in a popup and close it after execution every time . I think this works because every time the popup DOM is loaded as "new" by the browser.

var attributes = {
            code: '...Applet.class',
            archive: '...applet.jar',
            codebase: '/context',
            width: 1,
            height: 1,
            separate_jvm: true
        };
var parameters = {
        someCallback: 'opener.appletCallback',
        };

var aPopup = null;
function deployAppletInAPopup() {
    setTimeout(function () {
        aPopup = window.open('', '', 'width=100,height=100');
        aPopup.document.open();
        deployJava.runAppletIntoDocument(aPopup.document, attributes, parameters, "1.6");
        aPopup.document.close();
    }, 10);
}

function appletCallback() {
    setTimeout(function () {
        if (aPopup) {
            aPopup.close();
        }
        aPopup = null;
    }, 10);
}

[...]

<button onclick="deployAppletInAPopup()">Deploy Applet into a Popup</button>

I am using Windows 10, IE11 and jdk-8u181-windows-i586. This problem only in Java 8 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM