DeployJava.js does not detect JRE in IE 11

I use deployJava.js to enable such applets:

<script> var attributes = { name:'ForrestGump', id:'ForrestGump', codebase:'java/', code:'ForrestGump', cache_archive:'ForrestGumpSigned.jar', cache_option:'Plugin', initial_focus:false, width:1, height:1 }; var parameters = { } ; var version = '1.7.0' ; deployJava.runApplet(attributes, parameters, version); </script> 

Some users using IE 11 (on Windows 7, I'm not sure about Windows 8.1) complained that it would automatically redirect them to the Java download page (before loading the applet), even if the latest Java was already installed. I checked this using the Java Verification applet and setting var version = '1.1'; in js over which they say there will be no forced concrete version.

The validation applet tells me that Java is installed, and even with version = '1.1' it still redirects them. Another thing that I noticed is that the Java Uninstall Tool does not load for them. He says java is not installed. Rebooting the browser and PC does not seem to affect this.

Has anyone come across this before? Any advice on how I can disable deployJava from being redirected to the download page no matter what happens, or bypass IE 11.

+7
java internet-explorer deployjava
source share
3 answers

After some digging, it seems that this is due to the fact that Microsoft is changing the user agent that reports Internet Explorer 11 (see here ). The deployJava.js library has its own browser discovery function (getBrowser ()), and it does not handle the user agent for IE11 correctly.

The following error reports from OpenJDK describe this issue:

I tried the "official" version of deployJava.js ( here ), and it has not yet been updated with the fix. The proposed approach is to modify the getBrowser method to search for a "trident" in addition to "MSIE". If you don't want to wait for Oracle to do the upgrade, you can simply create your own local copy of deployJava.js and replace:

(o.indexOf("msie")!=-1)

from

((o.indexOf("msie")!=-1)||(o.indexOf("trident")!=-1))

+14
source share

Oracle is already fixing this problem, as Mr. T mentioned in his latest deployJava.js file.
But I still encounter an error, they still redirect me to http://java.com/en/download/ie_manual.jsp

Although I installed the latest JRE in my IE11. After a dig in deployJava.js, it turns out in the function testUsingActiveX ()

 if (typeof ActiveXObject == "undefined" || !ActiveXObject) { g("[testUsingActiveX()] Browser claims to be IE, but no ActiveXObject object?"); return false } 

I modified the above function below

 if("ActiveXObject" in window) { //do nothing } else if (typeof ActiveXObject == "undefined" || !ActiveXObject) { g("[testUsingActiveX()] Browser claims to be IE, but no ActiveXObject object?"); return false } 

Solution Above SebLD Loan

+3
source share

Although this is not a great solution, removing the idea of ​​compatibility in IE solved the problem.

0
source share

All Articles