禁用 Java 安全和警告消息
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28750851/
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
Disable Java security and warning messages
提问by user1911
I update Java 6 to Java 8u25 and now appear two messages:
我将 Java 6 更新为 Java 8u25,现在出现两条消息:
First message:Do you want to run this application? Name: ----.jar
第一条消息:您要运行此应用程序吗?名称:----.jar
Second message:Warning - Unavailable Version of Java Requested:This application would like to use a version of Java (1.6) that is not intalled on your system.
第二条消息:警告 - 请求的 Java 版本不可用:此应用程序想要使用您的系统中未安装的 Java (1.6) 版本。
These messages appear when a client run the java application (jnlp) and I would like to disable or hide their. The clients download the java application from a server.
当客户端运行 java 应用程序 (jnlp) 时会出现这些消息,我想禁用或隐藏它们。客户端从服务器下载 Java 应用程序。
I don't know if there are commands to disable their or with windows registry.
我不知道是否有命令可以禁用它们或使用 Windows 注册表。
I know that there is a file called deployment.propertiesto add or remove parameters but I do not think it works in my case.
我知道有一个名为deployment.properties的文件可以添加或删除参数,但我认为它不适用于我的情况。
采纳答案by NotGaeL
You can't.
你不能。
Read Oracle's deployment.security.level
property description and you'll see that for Java >= 1.7 low security level has been removedwhich means that even signed applications cannot escape security prompts:
阅读 Oracle 的deployment.security.level
属性描述,您会看到 Java >= 1.7 的低安全级别已被删除,这意味着即使已签名的应用程序也无法逃脱安全提示:
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/jcp/properties.html#properties
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/jcp/properties.html#properties
Since java 7, warnings can only be disabled/ignored after first instance by the user or by a ruleset set by the system administrator: https://www.java.com/en/download/help/jcp_security.xml
从 java 7 开始,警告只能在用户或系统管理员设置的规则集之后禁用/忽略:https: //www.java.com/en/download/help/jcp_security.xml
(Starting with Java 8 update 20 medium security level has been removed too)
(从 Java 8 update 20 开始,中等安全级别也已被删除)
Of course you can force your clients to stick to 1.6 but that is unsafe and unprofessional, and you'll have to face potential warnings about Java version being obsolete anyway.
当然,您可以强制您的客户坚持使用 1.6,但这是不安全和不专业的,而且您将不得不面对有关 Java 版本已过时的潜在警告。