JDK-8026474 : deployJava.js versioncheck doesn't work in IE11
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-10-15
  • Updated: 2014-03-25
  • Resolved: 2013-11-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
7u55Fixed 8 b116Fixed
Related Reports
Relates :  
Subject: 	deployJava.js versioncheck doesn't work in IE11
Date: 	Tue, 15 Oct 2013 02:39:15 +0000
From: 	Danio Zhu <Danio.Zhu@autodesk.com>
To: 	javasedocs_us@oracle.com <javasedocs_us@oracle.com>



This is Danio Zhu from Autodesk, we recently found that the deployJava.js doesn���t work in IE11 (the default browser released with win8.1).


After looking into the code, we suspect it���s caused by the code below highlighted, because IE11 user-Agent string doesn���t contain the token ���msie��� anymore.


getBrowser:function(){if(this.browserName==null){var o=navigator.userAgent.toLowerCase();g("[getBrowser()] navigator.userAgent.toLowerCase() -> "+o);if((o.indexOf("msie")!=-1)&&(o.indexOf("opera")==-1)){this.browserName="MSIE";this.browserName2="MSIE"}


Could you help fix this issue ASAP? We are using this JS library to detect java version and run java applet on our web page.





SQE-OK to take this fix for jdk8

Verified the fix against http://sa.sfbay.sun.com/projects/deployment_data/8/8028629.1/raw_files/new/src/js/deployJava.js

this is just fix in deployJava.js - not part of actual binaries that will ship with any release. we just keep the file as part of the repo. will have SQE test this and post live to https://java.com/js/deployJava.js after SQE okay.

We are done with testing deployJava.js from http://sa.sfbay.sun.com/projects/deployment_data/8/8028629.1/raw_files/new/src/js/deployJava.js ( Could not find dtjava.js from above location) - There is no regression - JDK-8026474 fix verified There are a couple of non-regression issues - not related to this fix (same as using the live http://java.com/js/deployJava.js): - deployJava.versionCheck ('1.7') or deployJava.versionCheck ('1.7.0') returns 'true' for any version of 7u installed (not 7 fcs) - On Mac, deployJava.isPlugin2() returns 'false' for 7ux and 8 We can push http://sa.sfbay.sun.com/projects/deployment_data/8/8028629.1/raw_files/new/src/js/deployJava.js

Tested with Thomas's test deployJava.js http://javaweb.us.oracle.com/~tvng/8026474/ and there is a regression with this fix on Firefox and Chrome as deployJava.getJRE() does not return any installed JRE version on FF/GC

Sorry my bad, the above recommendation will also not work, since IE is now identifying itself as Netscape family in IE 11.0 The only way to find the browser is to check for the index of Trident (browser.indexOf('Trident') != -1) This was introduced from IE 9. Since the previous versions do not have this, we can still use the existing code to find MSIE and the next else if condition can be to check for the index of Trident. This is the only way the Internet explorer browser can be identified. All other javascript based browser detection returns generic values - (like Netscape, mozilla, gecko, etc). Is this fix alright?

After going through the various Microsoft forums, the main reason for this issue is that IE wants to remove the point of using browser specific code to display features. They recommend using feature specific checks. Since we cannot do this as our code is core and not specified to a particular feature, we cannot implement this. One way to change is to check for "navigation.appName == 'Microsoft Internet Explorer' " ----------> Refer : http://msdn.microsoft.com/en-us/library/ie/ms537509(v=vs.85).aspx#ParsingUA In case of Chrome and firefox this returns Netscape family and hence cannot be used to distinguish them. But for IE this works fine. This needs to be added to the getBrowser() function. Once added then it can return MSIE (as implemented currently by setting this.browserName = "MSIE" ). Is this implementation ok?