在浏览器中更改Java小程序使用的Java版本 [英] Change java version used by java applets in browser

查看:445
本文介绍了在浏览器中更改Java小程序使用的Java版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在具有Java小程序的站点上使用硒进行一些自动化测试.具体来说,我想在不同的浏览器上测试不同的Java版本.

I am trying to do some automated testing with selenium on a site that has a java applet. Specifically, I want to test different java versions on different browsers.

更改本地应用程序/命令行所使用的jre相对容易-通常只需修改PATH并可能修改注册表(HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Runtime Environment/CurrentVersion似乎需要有时会改变).

It is relatively easy to change the jre that is being used by local applications/commandline - usually just a modification of the PATH and perhaps a registry tweak (HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Runtime Environment/CurrentVersion seems to need to be changed sometimes).

但是我似乎无法设法更改浏览器小程序使用的内容.据我了解,此版本由该浏览器的插件确定.我试图通过实际卸载计算机上的所有jre,然后安装要测试的特定版本来解决此问题.但是,我需要Java始终可用,因此我要保留一个jdk(1.8.0_25).

But I can't seem to manage to change what a browser applet uses. It is my understanding that this version is determined by the plugin for that browser. I've tried to get around this by actually uninstalling all the jre on the machine, then installing the specific version I want to test. However, I need java to be available at all times so I am preserving a jdk (1.8.0_25).

这有时可行.最近,我一直在尝试安装jre7(更新71和更新72),但是这两个安装似乎都不会影响applet中使用的Java版本.在firefox中,加载项页面在插件下显示Java (TM) Platform SE 7 U72 10.72.2.14,但仍在小程序中运行1.8.0_25(来自 http://javatester.org/version.html )

This works, sometimes. Recently I've been trying to install jre7 (update 71 and update 72) but neither installation seems to affect the version of java used in the applet. In firefox, the add-ons page shows Java (TM) Platform SE 7 U72 10.72.2.14 under plugins, and yet it is running 1.8.0_25 in applets (from http://javatester.org/version.html)

我的问题是:如何确保特定版本的Java在浏览器小程序中运行?抱歉,如果我的情况有点令人困惑-我已尝试将其降低到最低限度.

My question is: how can I ensure that a specific version of java is running in browser applets? Sorry if my situation is a bit confusing - I've tried cutting it down to the bare minimum.

操作系统:Windows 7 Enterprise

OS: Windows 7 Enterprise

浏览器:Chrome 39.0.2171.71 m,FF35.0、33.0、27.0,IE8

Browsers: Chrome 39.0.2171.71 m, FF35.0, 33.0, 27.0, IE8

推荐答案

参考

Java

Java

Java面板如下所示:

The Java panel looks like this:

单击查看..."按钮以访问Java Runtime Environment. 设置对话框. Java运行时环境设置

Click the View... button to access the Java Runtime Environment Settings dialog. Java Runtime Environment Settings

这些设置将在启动Java应用程序时使用.这 Java Runtime Environment设置对话框如下所示: Microsoft Windows:

These settings will be used when a Java application is launched. The Java Runtime Environment Settings dialog looks like the following on Microsoft Windows:

"Java运行时版本"面板中的每一行代表一个Java运行时 您的计算机中安装的环境.您可以修改 双击每个单元格中的值:

Each row in the Java Runtime Versions panel represents a Java Runtime Environment that is installed in your computer. You may modify the value in each cell by double-clicking it:

  • 平台:Java运行时环境的版本
  • 产品:Java运行时环境的完整版本号(包括更新号)
  • 位置:Java Update Scheduler用于启动自动更新的URL
  • 路径:Java运行时环境的完整路径名
  • 运行时参数:可选的自定义选项,用于覆盖Java插件默认启动参数
  • 已启用:此选项用于选择在使用Java插件或Java运行应用程序时要考虑的哪个(较旧)JRE版本 Web开始.如果未选中此复选框,则Java插件和 Java Web Start将不会使用此JRE启动Java应用程序.但是,那 无论此复选框如何,都可以使用当前的JRE.此复选框 不会影响独立的应用程序,它仅适用于Java 浏览器.请注意,如果所有Java应用程序都被禁止在 通过在浏览器中取消选择启用浏览器中的Java内容, 安全面板,在此处启用JRE无效.
  • Platform: The version of the Java Runtime Environment
  • Product: The full version number of the Java Runtime Environment (which includes the update number)
  • Location: The URL that Java Update Scheduler uses to launch automatic updates
  • Path: The full path name of the Java Runtime Environment
  • Runtime Parameters: Optional custom options used to override the Java Plug-in default startup parameters
  • Enabled: This option is for selecting which of the (older) JRE versions to consider when running an app using Java Plug-in or Java Web Start. If this check box is not selected, then Java Plug-in and Java Web Start will not use this JRE to launch Java apps. However, the current JRE might be used regardless of this checkbox. This checkbox does not affect stand alone applications, it is only for Java in the browser. Note that if all Java apps are disabled from running in the browser, by de-selecting Enable the Java content in the browser in the Security panel, enabling the JRE here has no effect.

使用Enabled复选框选择使用Java插件或Java Web Start运行应用程序时使用的JRE.

Use the Enabled checkbox to select which JRE to use when running an app using Java Plug-in or Java Web Start.

这篇关于在浏览器中更改Java小程序使用的Java版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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