更改 Java 安全级别

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

Change Java Security level

javawindowssecurityjava-7

提问by IT researcher

Java 7 update 51 has java security level which is set to HIGH by default. I want to change it to medium by using registry or by adding any files. I observed that manually changing security level to medium from high creates registry

Java 7 更新 51 具有默认设置为高的 Java 安全级别。我想通过使用注册表或添加任何文件将其更改为中等。我观察到手动将安全级别从高更改为中会创建注册表

[HKEY_CURRENT_USER\Software\JavaSoft\DeploymentProperties]
"deployment.security.level"="MEDIUM"

But if i manually create the above registry then java security setting does not change and created registry gets deleted. So I think there must be other files which does it. So how can I change java security setting? I have seen some articlesand forum links but didn't get what I wanted. Also this is not to set security level for my customers and it is for my office where number of employees need to change this setting(all are windows OS pc's) and it will be easy if there is automation like code or a registry entries.

但是,如果我手动创建上述注册表,则 Java 安全设置不会更改,并且创建的注册表会被删除。所以我认为必须有其他文件可以做到这一点。那么如何更改java安全设置?我看过一些文章和论坛链接,但没有得到我想要的。此外,这不是为我的客户设置安全级别,而是为我的办公室设置的员工数量需要更改此设置(都是 Windows 操作系统 pc 的),如果有代码或注册表项之类的自动化,这将很容易。

回答by scigor

To change the security settings you need to modify the deployment.config of java (not the registry). It is located at

要更改安全设置,您需要修改 java 的 deployment.config(而不是注册表)。它位于

Windows Directory\Sun\Java\Deployment\deployment.config // system level

Windows Directory\Sun\Java\Deployment\deployment.config // 系统级

or

或者

User Application Data Folder\LocalLow\Sun\Java\Deployment\deployment.properties // user level

User Application Data Folder\LocalLow\Sun\Java\Deployment\deployment.properties // 用户级别

You need to add the entry:

您需要添加条目:

deployment.security.level=MEDIUM

部署.安全.级别=中

The documentation on this can be found here: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/jcp/properties.html

关于这方面的文档可以在这里找到:http: //docs.oracle.com/javase/7/docs/technotes/guides/jweb/jcp/properties.html

Hope this helps.

希望这可以帮助。

回答by Dhiraj Himani

Thanks for your help The proper path is

感谢您的帮助正确的路径是

C:\Users\Your_Account_Name\AppData\LocalLow\Sun\Java\Deployment\deployment.properties

C:\Users\Your_Account_Name\AppData\LocalLow\Sun\Java\Deployment\deployment.properties

enter at the last line

在最后一行输入

deployment.security.level=MEDIUM

部署.安全.级别=中

restart the browser and good to go

重新启动浏览器,一切顺利

回答by lexa-b

This bug has been described here.
I was resolved it by downgrading to version 7u25

此错误已在此处描述。
我通过降级到版本 7u25 解决了它