7

I'm using deployJava.js to include applets like so:

<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 (in Windows 7, I'm not sure about windows 8.1) have complained that it will automatically forward them to the Java download page (before the applet loads) even though the latest java is already installed. I have verified this by using both Java's Verification applet and by setting var version = '1.1'; in the js above which they say will won't force a specific version.

The verification applet tells me Java is installed, and even with version='1.1' it still redirects them. Another thing I noticed is that the Java Uninstall Tool doesn't load for them. It says java is not installed. Restarting the browser and the PC seem to have no affect on this.

Has anyone run into this before? Any advice on how I can disable deployJava from forwarding to the download page no matter what, or else an IE 11 workaround.

William W
  • 1,776
  • 6
  • 21
  • 40

3 Answers3

14

After some digging it appears that this is due to Microsoft changing the user agent that Internet Explorer 11 reports (see here). The "deployJava.js" library has it's own browser detection function (getBrowser()) and it does not handle the user agent for IE11 correctly.

The following bug reports from OpenJDK talk about this issue:

I tried the "official" version of deployJava.js (here) and it has not been updated with a fix yet. The suggested work-around is to modify the "getBrowser" method to look for "trident" in addition to "MSIE". If you don't want to wait for Oracle to make the update you could just create your own local copy of deployJava.js and replace:

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

with

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

Mr. T
  • 166
  • 1
  • 5
  • This fixed it, thanks. It was difficult to test it on my Windows 8 machine since MS won't let you download IE 11 unless you are on win 7 or 8.1. Go figure. – William W Nov 20 '13 at 20:21
  • I have attempted this, and does not seem to work with me. Others have suggested running IE as administrator as well. Which seems to have worked for some. I am running with Windows 7 x86 and IE 11 with the new java u51 update. – skift Jan 24 '14 at 02:49
  • their new versions of the deployJava.js have checks in there for trident. but at this point still does not work. It looks like that fix will go into u55. Hopefully it works then and soon. – skift Jan 24 '14 at 02:58
3

Oracle already fix this issue as mentioned by Mr. T in their latest deployJava.js.
But I still encounter error ,I was still being redirected to http://java.com/en/download/ie_manual.jsp

Although I installed latest JRE in my IE11. After digging into deployJava.js, turns out in function testUsingActiveX()

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

I modifed the above function to 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 credit to SebLD

kypronite
  • 259
  • 3
  • 9
0

Although not a great solution, unsetting the compatibility view in IE solved the problem.

Pedro
  • 692
  • 8
  • 24