为什么在成功安装 JRE 后 Java 7 无法验证 - Java 7 没有运行我的任何浏览器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21667848/
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-13 09:58:36  来源:igfitidea点击:

Why does Java 7 fail to Verify after successful JRE installation - Java 7 not running my any browser

javaappletjnlpverification

提问by srecinto

This question was dogging me for a few days until I found almost a full answer but I want to share the issue first:

这个问题困扰了我几天,直到我找到了几乎完整的答案,但我想先分享这个问题:

ISSUE

问题

I have a Windows 7 pro 64 bit laptop that supports both IPv4 and IPv6 (important later) I downloaded and installed the latest Java 7 u 51 jre / browser plugin and would always get a grey applet box before it would eventually redirect and say "failed to verify" if java was installed.

我有一台支持 IPv4 和 IPv6 的 Windows 7 pro 64 位笔记本电脑(稍后很重要)我下载并安装了最新的 Java 7 u 51 jre / 浏览器插件,并且总是会得到一个灰色的小程序框,然后它最终会重定向并说“失败验证”是否安装了java。

I am also a java developer and had a few JDKs installed as well as jres. Thinking it was my environment I did a complete wipe of jave from my system (I ran JavaRa and made sure everything was removed http://singularlabs.com/software/javara/)

我也是一名 Java 开发人员,并且安装了一些 JDK 和 jres。认为这是我的环境,我从系统中彻底清除了 jave(我运行了 JavaRa 并确保删除了所有内容http://singularlabs.com/software/javara/

I installed the 32 bit version of the JRE for the chrome plugin and made sure all the setting and security info was correct (per the many posts about this topic).

我为 chrome 插件安装了 32 位版本的 JRE,并确保所有设置和安全信息都是正确的(根据有关此主题的许多帖子)。

After clearing all cache (browser and java), punching holes through my firewall (even disabling it to see if that would resolve it) as well as running things as administrator, verifying java was installed and running in all my browsers (it failed in IE, Chrome and FF)

清除所有缓存(浏览器和 java)后,在我的防火墙上打孔(甚至禁用它以查看是否可以解决它)以及以管理员身份运行,验证 java 已安装并在我的所有浏览器中运行(它在 IE 中失败) , 铬和 FF)

All of this was per many posts that said how to solve the issue of Java 7 not running in any browser.

所有这些都是关于如何解决 Java 7 无法在任何浏览器中运行的问题的许多帖子。

After enabling full trace and debugging with the Java console via the Java Control Panel I finally get some decent clues from the stack traces displayed in the console. It was failing to get resources from java or any site that had an applet or jnlp web start file.

在通过 Java 控制面板使用 Java 控制台启用完整跟踪和调试后,我终于从控制台中显示的堆栈跟踪中获得了一些不错的线索。它无法从 java 或任何具有小程序或 jnlp Web 启动文件的站点获取资源。

采纳答案by srecinto

SOLUTION

解决方案

Finally I ran across this post here (Java 7 on 32-bit Windows 7 - Java Webstart - Unable to load resource)

最后我在这里看到了这篇文章(Java 7 on 32-bit Windows 7 - Java Webstart - Unable to load resource)

When adding "-Djava.net.preferIPv4Stack=true" to the runtime parameters under the Java Control Panel (java tab, view) for the current JRE, it solved the problem. I was able to restore my security setting to proper levels and was able to run the java verification tests as well asa bunch of other applets just fine.

在当前 JRE 的 Java 控制面板(java 选项卡,视图)下的运行时参数中添加“-Djava.net.preferIPv4Stack=true”时,问题解决了。我能够将我的安全设置恢复到适当的级别,并且能够运行 java 验证测试以及一堆其他小程序就好了。

When it cam to running jnlp files, I would still get errors unless I manually edit the jnlp file and add it to the vm args i.e.

当它开始运行 jnlp 文件时,除非我手动编辑 jnlp 文件并将其添加到 vm args 中,否则我仍然会遇到错误,即

If you want to apply this change system wide, add the _JAVA_OPTIONSenvironment variable and add -Djava.net.preferIPv4Stack=trueto it

如果要在系统范围内应用此更改,请添加_JAVA_OPTIONS环境变量并将-Djava.net.preferIPv4Stack=true添加到它

Regards, Shawn Recinto

问候, 肖恩·雷辛托

回答by Cecily

We are using Windows 8.1 and after updating to the newest java 7u51 we had the same problem and after tech service gave up on our problem, using your help, we found that there was a check box in the Java Control panel that said "Enable Java content in the browser" just needed to be checked. This apparently still needed to be done even though it had already been enabled in the internet settings 'manage add-ons'.

我们使用的是 Windows 8.1,在更新到最新的 java 7u51 后,我们遇到了同样的问题,在技术服务放弃我们的问题后,使用您的帮助,我们发现 Java 控制面板中有一个复选框,上面写着“启用 Java浏览器中的内容”只需要检查。这显然仍然需要完成,即使它已经在互联网设置“管理附加组件”中启用。

This check box was under the Security Tab in the Java Control Panel.

此复选框位于 Java 控制面板中的安全选项卡下。

回答by Serj Sagan

If you have Chrome and 64-bit Windowshere is the answer (originally found here):

如果您有 Chrome 和 64 位 Windows,这里是答案(最初在这里找到):

"... We all will just have to not use Chrome until they have another release or patch to fix the problem, or roll back Java to pre-7 versions. "Chrome does not support Java 7. Java 7 runs only on 64-bit browsers and Chrome is a 32-bit browser.

“...在他们发布另一个版本或补丁来解决问题,或者将 Java 回滚到 7 之前的版本之前,我们都必须不要使用 Chrome。”Chrome 不支持 Java 7。Java 7 仅在 64-位浏览器,而 Chrome 是 32 位浏览器。

If you download Java 7, you will not be able to run Java content in Chrome and will need to use a 64-bit browser (such as Safari or Firefox) to run Java content within a browser. Additionally, installing Java 7 will disable the ability to use Apple Java 6 on your system..."

如果您下载 Java 7,您将无法在 Chrome 中运行 Java 内容,并且需要使用 64 位浏览器(例如 Safari 或 Firefox)才能在浏览器中运行 Java 内容。此外,安装 Java 7 将禁用在您的系统上使用 Apple Java 6 的能力......”

回答by Programmer man

Solution

解决方案

This is a Java.net.SocketException, problem the first answer is correct but here is a very quick way of solving this problem in under a minute.

这是一个 Java.net.SocketException,问题第一个答案是正确的,但这是一种在一分钟内解决此问题的非常快速的方法。

How to fix

怎么修

  1. Open command prompt (windows start button, type cmd in search)
  2. Click top left of command prompt, click properties, enable quick edit mode
  3. Copy: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
  4. Right click on command prompt, should paste
  5. Hit enter. That easy!
  1. 打开命令提示符(windows 开始按钮,在搜索中输入 cmd)
  2. 单击命令提示符左上角,单击属性,启用快速编辑模式
  3. 复制:setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
  4. 右键单击命令提示符,应粘贴
  5. 点击进入。这么简单!

After following these steps you applets/java applications should run well and correctly.Refer to this site youtube video for visual presentation.https://www.youtube.com/watch?v=serdRSsl5wE

遵循这些步骤后,您的 applet/java 应用程序应该可以正常运行。请参阅此站点的 youtube 视频以进行可视化演示。https://www.youtube.com/watch?v=serdRSsl5wE

回答by Amanda Lewis

This is a Java.net.SocketException, problem the first answer is correct but here is a very quick way of solving this problem in under a minute:

这是一个Java.net.SocketException问题,第一个答案是正确的,但这里有一种在一分钟内解决此问题的非常快速的方法:

Open command prompt (windows start button, type cmd in search)
Click top left of command prompt, click properties, enable quick edit mode
Copy: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
Right click on command prompt, should paste
Hit enter. That easy!

After following these steps you applets/java applications should run well and correctly.Refer to this site youtube video for visual presentation.

遵循这些步骤后,您的 applet/java 应用程序应该可以正常运行。请参阅此站点的 youtube 视频以进行可视化演示。

Reference: https://www.youtube.com/watch?v=serdRSsl5wE

参考:https: //www.youtube.com/watch?v=serdRSsl5wE