deployJava.js未在IE 11中检测到JRE [英] deployJava.js not detecting JRE in IE 11

查看:132
本文介绍了deployJava.js未在IE 11中检测到JRE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用deployJava.js包含如下的applet:

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>

一些使用IE 11(在Windows 7中,我不确定Windows 8.1)的用户抱怨说,即使已经安装了最新的Java,它也会自动将它们转发到Java下载页面(在applet加载之前).我已经通过同时使用 Java的验证小程序和设置var version ='1.1'来验证了这一点;他们说上面的js中不会强制使用特定版本.

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.

验证小程序会告诉我已安装Java,即使版本为"1.1",它仍会重定向它们.我注意到的另一件事是 Java卸载工具不会为其加载.它说没有安装java.重新启动浏览器和PC似乎对此没有任何影响.

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.

以前有人遇到过吗?任何有关如何禁止deployJava都无法转发到下载页面的建议,无论如何,或者是IE 11的解决方法.

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.

推荐答案

在进行一些挖掘之后,这似乎是由于Microsoft更改了Internet Explorer 11报告的用户代理(请参见

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.

OpenJDK的以下错误报告讨论了此问题:

The following bug reports from OpenJDK talk about this issue:

  • JDK-8026474
  • JDK-8028629

我尝试了deployJava.js的正式"版本(在此处),但尚未对其进行修复.然而.建议的解决方法是修改"getBrowser"方法以查找"MSIE"之外的三叉戟".如果您不想等待Oracle进行更新,则可以创建自己的deployJava.js本地副本并替换:

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)

使用

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

这篇关于deployJava.js未在IE 11中检测到JRE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆