Oracle's deployjava.js is no longer functional in Firefox/Chrome. What else can I do?

KC Wong :

Since Firefox and Chrome blocked Java Plugin, Oracle's deployjava.js used a trick to detect JRE - by using navigator.mimeTypes array and locating Java's mime types inside.

But Firefox no longer exposes navigator.mimeTypes. Since version 53 it is an empty array.

For Chrome, the array is still accessible but no longer contains Java's mime types.

I already migrated my applets to using JNLP, but I still need to make sure the client has a suitable JRE, otherwise the end users will be looking at a dialog asking them to pick an application to launch the .jnlp file, and they won't know what to do.

What other methods can I use to verify JRE on client computer from my website?

user8811940 :

If you don't find any other better way, you might communicate from the applet to your javascript to say that the applet is running. From Javascript, if after a few seconds the applet haven't communicated, then you can show a message about it "You might not have JRE installed ..."

Other option is to use CSS for it. You can use position: absolute to put your embed element layering on top of some other element. If the applet loads, then the background is opaque, so it will hide the content in the bottom, if it never loads, then it will show the content in the back.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=440770&siteId=1