强制 Internet Explorer 使用特定的 Java 运行时环境安装?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/71254/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 07:57:23  来源:igfitidea点击:

Force Internet Explorer to use a specific Java Runtime Environment install?

internet-explorerinternet-explorer-6javaplugins

提问by

When viewing someone else's webpage containing an applet, how can I force Internet Explorer 6.0 to use a a particular JRE when I have several installed?

在查看包含小程序的其他人的网页时,当我安装了多个小程序时,如何强制 Internet Explorer 6.0 使用特定的 JRE?

采纳答案by Stephen Denne

If you mean when you are not the person writing the web page, then you could disable the add ons you do not wish to use with the Manage Add-OnsIE Options screen added in Win XP SP2

如果您的意思是当您不是编写网页的人时,那么您可以通过Win XP SP2 中添加的管理加载项IE 选项”屏幕禁用您不希望使用的加载项

回答by BrezzaP

For the server-side solution (which your question was originally ambiguous about), this page at sunlists one way to specify a JRE. Specifically,

对于服务器端解决方案(您的问题最初是模棱两可的),sun 上的这个页面列出了一种指定 JRE 的方法。具体来说,

<OBJECT 
  classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  width="200" height="200">
  <PARAM name="code" value="Applet1.class">
</OBJECT>

The classid attribute identifies which version of Java Plug-in to use.

Following is an alternative form of the classid attribute:

classid="clsid:CAFEEFAC-xxxx-yyyy-zzzz-ABCDEFFEDCBA"

In this form, "xxxx", "yyyy", and "zzzz" are four-digit numbers that identify the specific version of Java Plug-in to be used.

For example, to use Java Plug-in version 1.5.0, you specify:

classid="clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA"

classid 属性标识要使用的 Java 插件版本。

以下是 classid 属性的另一种形式:

classid="clsid:CAFEEFAC-xxxx-yyyy-zzzz-ABCDEFFEDCBA"

在这种形式中,“xxxx”、“yyyy”和“zzzz”是四位数字,用于标识要使用的 Java Plug-in 的特定版本。

例如,要使用 Java Plug-in 版本 1.5.0,请指定:

classid="clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA"

回答by Stephen Denne

Use the deployment Toolkit's deployJava.js(though this ensures a minimum version, rather than a specific version)

使用部署工具包deployJava.js(尽管这确保了最低版本,而不是特定版本)

回答by Daniel Cassidy

First, disable the currently installed version of Java. To do this, go to Control Panel > Java > Advanced > Default Java for Browsersand uncheck Microsoft Internet Explorer.

首先,禁用当前安装的 Java 版本。为此,请转到“控制面板”>“Java”>“高级”>“浏览器的默认 Java”并取消选中Microsoft Internet Explorer

Next, enable the version of Java you want to use instead. To do this, go to (for example) C:\Program Files\Java\jre1.5.0_15\bin(where jre1.5.0_15is the version of Java you want to use), and run javacpl.exe. Go to Advanced > Default Java for Browsersand check Microsoft Internet Explorer.

接下来,启用您想要使用的 Java 版本。为此,请转到(例如)C:\Program Files\Java\ jre1.5.0_15\bin(其中jre1.5.0_15是您要使用的 Java 版本),然后运行javacpl.exe。转至高级 > 浏览器的默认 Java并检查Microsoft Internet Explorer

To get your old version of Java back you need to reverse these steps.

要恢复旧版本的 Java,您需要颠倒这些步骤。

Note that in older versions of Java, Default Java for Browsersis called <APPLET> Tag Support(but the effect is the same).

请注意,在旧版本的 Java 中,浏览器的默认 Java称为<APPLET> 标签支持(但效果相同)。

The good thing about this method is that it doesn't affect other browsers, and doesn't affect the default system JRE.

这种方法的好处是不影响其他浏览器,也不影响默认系统JRE。

回答by Hyman Leow

I'd give all the responses here a try first. But I wanted to just throw in what I do, just in case these do not work for you.

我会先尝试一下这里的所有回复。但我只想投入我所做的,以防万一这些对你不起作用。

I've tried to solve the same problem you're having before, and in the end, what I decided on doing is to have only one JRE installed on my system at a given time. I do have about 10 different JDKs (1.3 through 1.6, and from various vendors - Sun, Oracle, IBM), since I do need it for development, but only one standalone JRE.

我已经尝试解决您之前遇到的相同问题,最后,我决定做的是在给定时间在我的系统上只安装一个 JRE。我确实有大约 10 个不同的 JDK(1.3 到 1.6,来自不同的供应商——Sun、Oracle、IBM),因为我确实需要它来进行开发,但只有一个独立的 JRE。

This has worked for me on my Windows 2000 + IE 6 computer at home, as well as my Windows XP + Multiple IE computer at work.

这对我在家中的 Windows 2000 + IE 6 计算机以及我的 Windows XP + 多 IE 计算机上都有效。

回答by Kayhadrin

I have the same issue today and I concur with Hyman Leow. Basically, on Windows XP, I had to go to Control Panel > Java and then:

我今天遇到了同样的问题,我同意 Hyman Leow 的观点。基本上,在 Windows XP 上,我必须转到控制面板 > Java,然后:

  1. Java tab
  2. Click on "View" button
  3. Enable only the JRE I want (i.e. JRE 1.5.x and keep 1.6.x disabled)
  4. Restart IE
  5. Load applet page in IE
  6. Et voila, it's loading the correct JRE version!
  1. Java 选项卡
  2. 点击“查看”按钮
  3. 仅启用我想要的 JRE(即 JRE 1.5.x 并保持 1.6.x 禁用)
  4. 重启浏览器
  5. 在 IE 中加载小程序页面
  6. 瞧,它正在加载正确的 JRE 版本!

回答by Scott Bennett-McLeish

As has been mentioned here for JRE6 and JRE5, I will update for JRE1.4:

正如此处针对 JRE6 和 JRE5 所提到的,我将针对 JRE1.4 进行更新:

You will need to run the jpicpl32.exeapplication in the jre/bin directory of your java installation (e.g. c:\java\jdk1.4.2_07\jre\bin\jpicpl32.exe).

您需要在 java 安装的 jre/bin 目录中运行jpicpl32.exe应用程序(例如c:\java\jdk1.4.2_07\jre\bin\jpicpl32.exe)。

This is an earlier version of the application mentioned in Daniel Cassidy's post.

这是 Daniel Cassidy 的帖子中提到的应用程序的早期版本。

回答by user1683903