1

I have some troubles with Java Applets since my Customer updated his Java Environment to Version java 1.8. u60.

The Applet init is always horrible slow on page request. The Problem appears only in IE (tested 8, 10, 11), no problem with Firefox!

IE - Java Console -Log:

AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 275883 us,
pluginInit dt 196499884 us, TotalTime: 196775767 us
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch
dt 275883 us, pluginInit dt 196499884 us, TotalTime: 196775767 us

In Detail the IE - Java Console -Log where the behavior happens:

basic: Applet-Teardown wird gestartet
preloader: Delivering: ApplicationExitEvent
preloader: Enqueue: com.sun.javaws.progress.PreloaderDelegate$4@1518c9b
basic: Applet-Teardown beendet
basic: PluginMain.unregisterApplet: 10 from mananger
sun.plugin2.applet.Applet2Manager@da2dbb
ui: plugin2manager.parentwindowDispose
basic: Fortschritts-Listener entfernt:
sun.plugin.util.ProgressMonitorAdapter@9e3fee
preloader: Start progressCheck thread
preloader: Stop progressCheck thread queue.size()=0
basic: Applet-Teardown wird gestartet
preloader: Delivering: ApplicationExitEvent
preloader: Enqueue: com.sun.javaws.progress.PreloaderDelegate$4@56fa06
basic: Applet-Teardown beendet
basic: PluginMain.unregisterApplet: 11 from mananger
sun.plugin2.applet.Applet2Manager@176fe71
ui: plugin2manager.parentwindowDispose
preloader: Stop progressCheck thread queue.size()=0
---------20s stop here---------
preloader: Construct preloader delegate
preloader: Construct preloader delegate adapter=class 
com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter

FF - Java Console -Log:

ppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 330332 us,
pluginInit dt 687763051 us, TotalTime: 688093383 us
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch
dt 330332 us, pluginInit dt 687763051 us, TotalTime: 688093383 us

What can i do to figure out or solve the Problem ?

blub
  • 359
  • 6
  • 23
  • I have the same problem .. any solution beside the workaround explained in the answer below ? – Mourad Zouabi Dec 02 '15 at 17:04
  • Of course, we decided to remove the Java Applet and replace it with another Framework, because nobody knows how long such kind of workaround will be work... May be only until the next Java Update and then you start from new. – blub Dec 03 '15 at 17:53

1 Answers1

3

Use JavaScript to modify an existing tag and insert the APPLET tag. Here I also insert the tag to modify in JavaScript document.write('<div id="java-rsaspobj">Java Applet comes here</div>');

function rsaspobj_init(codebase, status_report, direct_applet_tag) {
    var elem = document.getElementById("java-rsaspobj")
    if (!elem && !direct_applet_tag) {
        alert('HTML div with id java-rsaspobj is missing on this page');
        return;
    }
    var applet_tag = '<APPLET id="RSAspProxyApplet" name="RSAspProxyApplet"'
        + ' codebase="' + codebase +'"'
        + ' code="RSProxy" archive="RSProxy.jar"';
    if (status_report)
        applet_tag += ' height="100" width="100" java_status_events="true"';
    else
        applet_tag += ' height="0" width="0"';
    applet_tag += '></APPLET>';
    if (direct_applet_tag)
        document.write(applet_tag); // 20 sec delay
    else
        elem.innerHTML = applet_tag; // no delay
}
  • Strangely enough this eliminated the performance issues for me. Just put a call to a modified version of the code above in the body's `onload` tag and everythings back to normal. Is there a bug files with oracle yet? – nbred Nov 05 '15 at 13:54
  • Same issue here when using $(selector).replaceWith(applettag). Solved simply assigning innerHTML when the browser is IE. – Matteo Steccolini Sep 15 '16 at 13:37