简体   繁体   中英

Java applet no longer functional in Internet Explorer under Java 8u60

I maintain a few applets used for a website and Java 8u60 makes them just not fire. I'm not sure exactly what's going on.

Here is how I declare the tag for IE:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
   <param name="code" value="com.mysite.myapplet" />
   <!-- other params -->
</object>

One detail: the applet must not fire on page load, but on a button click, so the above tag is generated by Javascript, which injects the HTML into a div's innerHTML property. Is there a workaround?

This is the workaround I found: use an APPLET tag.

"But all the doc says to use OBJECT for IE support?"

I know. But even Java's own deployJava.js outputs an APPLET tag.

Apparently this is a bug specifically introduced in 8u60 which makes injected HTML OBJECT tags inoperative.

So instead, inject this:

<applet code="com.mysite.myapplet">
    <param name="classid" value="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" />
    <!-- other params -->
</applet>

That should work. Applets that fire automatically on opening the page can be left as objects.

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