Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

64 bit plugin of JRE/JDK/Java 9 is incompatible with IE 11 64 bit

I'm trying to run applet with JRE 9 on internet explorer 11 (64 bit), but it doesn't run. I've tried on windows 10 and server 2012. In my application, we detect the installed jre version using deployJava.js. If no version is found a download prompt is displayed. This detection is done through javascript function getJREs which can be found here. See snippet below:

getJREs: function() {
    var list = new Array();
    if (this.isPluginInstalled()) {
        var plugin =  this.getPlugin();
        var VMs = plugin.jvms;
        for (var i = 0; i < VMs.getLength(); i++) {
            list[i] = VMs.get(i).version;
        }
    } else {
        var browser = this.getBrowser();

        if (browser == 'MSIE') {
            if (this.testUsingActiveX('9')) {
                list[0] = '9';
            } else if (this.testUsingActiveX('1.8.0')) {
                list[0] = '1.8.0';
            } else if (this.testUsingActiveX('1.7.0')) {
                list[0] = '1.7.0';
            } else if (this.testUsingActiveX('1.6.0')) {
                list[0] = '1.6.0';
            } else if (this.testUsingActiveX('1.5.0')) {
                list[0] = '1.5.0';
            } else if (this.testUsingActiveX('1.4.2')) {
                list[0] = '1.4.2';
            } else if (this.testForMSVM()) {
                list[0] = '1.1';
            }
        } else if (browser == 'Netscape Family') {
            this.getJPIVersionUsingMimeType();
            if (this.firefoxJavaVersion != null) {
                list[0] = this.firefoxJavaVersion;
            } else if (this.testUsingMimeTypes('9')) {
                list[0] = '9';
            } else if (this.testUsingMimeTypes('1.8')) {
                list[0] = '1.8.0';
            } else if (this.testUsingMimeTypes('1.7')) {
                list[0] = '1.7.0';
            } else if (this.testUsingMimeTypes('1.6')) {
                list[0] = '1.6.0';
            } else if (this.testUsingMimeTypes('1.5')) {
                list[0] = '1.5.0';
            } else if (this.testUsingMimeTypes('1.4.2')) {
                list[0] = '1.4.2';
            } else if (this.browserName2 == 'Safari') {
                if (this.testUsingPluginsArray('9')) {
                    list[0] = '9';
                } else if (this.testUsingPluginsArray('1.8')) {
                    list[0] = '1.8.0';
                } else if (this.testUsingPluginsArray('1.7')) {
                    list[0] = '1.7.0';
                } else if (this.testUsingPluginsArray('1.6')) {
                    list[0] = '1.6.0';
                } else if (this.testUsingPluginsArray('1.5')) {
                    list[0] = '1.5.0';
                } else if (this.testUsingPluginsArray('1.4.2')) {
                    list[0] = '1.4.2';
                }
            }
        }
    }

    if (this.debug) {
        for (var i = 0; i < list.length; ++i) {
            log('[getJREs()] We claim to have detected Java SE ' + list[i]);
        }
    }

    return list;
}

In the case of JRE 9 this function is not able to detect the java version and applet failed to load. Here are the discussionsI saw which talks in same lines:

  1. JDK-8188306
  2. JDK-8193431
  3. JDK-8162522
  4. This microsoft answer
  5. This SO OP solves it using 32 bit JRE. In my case its not possible as Oracle didn't release the 32 bit version of JRE/JDK 9.

Also I could see that both the Java SSV plugin helpers are listed as incompatible in the list of IE addons.

I've tried to load the applet with JRE 1.8 (both 32 bit and 64 bit), it loads perfectly fine.

I understand that applets have been deprecated in java 9, but deprecation doesn't mean they won't run, do they?

PS: I would appreciate if you don't ask me not to use applet as I have to do it for legacy purposes. So, thanks in advance!

like image 670
Shanu Gupta Avatar asked Nov 07 '22 11:11

Shanu Gupta


1 Answers

The end of 32-bit JRE by Oracle makes it impossible to run applets in IE11 without making non-default settings to it for clients installing the Oracle JRE. Applets can still run but only if the end-user or admin makes the necessary settings to make IE work with 64-bit JRE. The install of the JRE doesn't make these settings, they break 32-bit only plugins and revert IE11 to a one process model. So this will only work in a controlled environment.

See this question for settings: Run 64 bit Java with Internet explorer 11

Theoretically java web start should work even without forcing 64-bit settings for IE and then you could run an applet that doesn't require javascript bindings in the webstart appletviewer. So, in very specific circumstances that might be an option to run an applet, starting from default IE11 with JRE10.

See: https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/applet_migration.html

A little excursion for the curious, there is actually a 32-bit Windows build of openjdk 10 here: https://github.com/ojdkbuild/ojdkbuild. It does include the Ice Tea Web (ITW) launcher, but this uses npapi, so doesn't work anymore today for in-browser applets.

like image 177
Gerrit Avatar answered Nov 15 '22 07:11

Gerrit