部署规则集所需的 Java 版本不可用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21540665/
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
Deployment Rule Set Required Java version not available
提问by cnesty
Hi I am running windows 7 on a 32 bit machine and I recently upgraded to Java 1.7.0_51 and now I can't access certain java applets. I have tried to configure the Deployment Rule Set by following this tutorial
嗨,我在 32 位机器上运行 Windows 7,我最近升级到 Java 1.7.0_51,现在我无法访问某些 Java 小程序。我已尝试按照本教程配置部署规则集
http://wraithhacker.com/java-deployment-rule-set/
http://wraithhacker.com/java-deployment-rule-set/
and I pretty much got everything working as illustrated. However when I try to visit the application I get the error that Application Blocked by Deployment Rule Set. Deployment Rule Set required Java version 1.6.0_45 not available.
我几乎让一切正常工作如图所示。但是,当我尝试访问该应用程序时,出现应用程序被部署规则集阻止的错误。部署规则集所需的 Java 版本 1.6.0_45 不可用。
I Not also the Java Console does not show up at all.
我也不是,Java 控制台根本不显示。
The Java versions installed on my system from the is 1.6.0_29 and 1.6.0_22 I have tried both in my ruleset.xml file but they haven't worked.
在我的系统上安装的 Java 版本是 1.6.0_29 和 1.6.0_22 我在我的 ruleset.xml 文件中都尝试过,但它们没有工作。
`<ruleset version="1.0+">
<rule>
<id location="https://10.0.0.1" />
<action permission="run" version="1.6.0_22" />
</rule>
<rule>
<id location="http://www.customs.gov.dm/" />
<action permission="run" version="1.6.0_22" />
</rule>
<rule>
<id />
<action permission="block">
<message>Blocked by NTRC Management</message>
</action>
</rule>
</ruleset>`
c:\Program Files\Java\jre1.6.0_22\bin>java -version java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
c:\Program Files\Java\jre1.6.0_22\bin>java -version java 版本“1.6.0_22” Java(TM) SE 运行时环境(构建 1.6.0_22-b04)Java HotSpot(TM) 客户端 VM(构建 17.1) -b03,混合模式,共享)
C:\Sites>java -version java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
C:\Sites>java -version java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) Client VM(build 24.51-b03,混合模式,共享)
So I am sure that I have both versions of Java installed.
所以我确定我安装了两个版本的 Java。
However if you go to java control panel and view the JNLP file I notice the following line
但是,如果您转到 java 控制面板并查看 JNLP 文件,我会注意到以下行
<java initial-heap-size="67108864" max-heap-size="268435456" java-vm-args="-XX:MaxNewSize=1024k" version="1.5+"/>
and for the other applet I notice the following
对于另一个小程序,我注意到以下内容
<java initial-heap-size="536870912" max-heap-size="1073741824" href="http://java.sun.com/products/autodl/j2se" version="1.6.0_16"/>
<java initial-heap-size="536870912" max-heap-size="1073741824" href="http://java.sun.com/products/autodl/j2se" version="1.6.0_20"/>
I read somewhere that this might be the problem as the JRE must be an exact match. Does this hold any validity? Any help would be much appreciated. Thanks
我在某处读到这可能是问题所在,因为 JRE 必须完全匹配。这有任何有效性吗?任何帮助将非常感激。谢谢
回答by MyITGuy
Unfortunately, using the plus (+) symbol tells the applet/JNLP on the site to use any version installed that is above 1.6. Including 1.7 or 1.8, which is not the desired outcome. Even with JRE 7u55 and early adopter version 8u20_b10, I am unaware of a version of JRE/JDK that works as advertised for forcing a site to use the version of JRE specified in the ruleset.xml. 8u20_b10 is close, but still has issues in our testing. Still waiting...
不幸的是,使用加号 (+) 符号会告诉站点上的小程序/JNLP 使用任何已安装的 1.6 以上版本。包括 1.7 或 1.8,这不是想要的结果。即使使用 JRE 7u55 和早期采用者版本 8u20_b10,我也不知道 JRE/JDK 的一个版本可以像宣传的那样工作以强制网站使用在 ruleset.xml 中指定的 JRE 版本。8u20_b10 已接近,但在我们的测试中仍然存在问题。还在等...
回答by Skianian
ok managed to figure this out.
好的设法解决了这个问题。
basically java now checks their own https://java.com/applet/JavaRemovalTool/launch.jnlpwhen it gets launched by the uninstallapplet.js
基本上java现在检查自己的https://java.com/applet/JavaRemovalTool/launch.jnlp,当它被uninstallapplet.js启动时
Java now doesnt like the fact that oracle.com is listed in the jnlp file.
Java 现在不喜欢 oracle.com 列在 jnlp 文件中的事实。
Thank goodness the jnlp is a text file and can be opened to see this.
谢天谢地,jnlp 是一个文本文件,可以打开查看。
So after adding oracle.com to the java console security Exception Site list, all is well !!
所以将oracle.com 添加到java 控制台安全异常站点列表后,一切正常!!
or try directly in notepad at:
或直接在记事本中尝试:
C:\Users\ USERNAME\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites
C:\Users\ USERNAME\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites