Windows 上的 java.security 文件在哪里?

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

Where is the java.security file located on Windows?

javawindowsjava-8java-7

提问by STW

I need to locate and edit the java.securityfile on a Windows 7 host. Where is it located in a default Oracle JRE installation?

我需要java.security在 Windows 7 主机上找到并编辑该文件。它位于默认 Oracle JRE 安装中的什么位置?

采纳答案by Nicolas Filotto

You should find it in JRE_HOME\lib\securityknowing that by default JRE_HOMEshould be c:\Program Files\Java\jre${version-id}

您应该JRE_HOME\lib\security知道默认情况下JRE_HOME应该是c:\Program Files\Java\jre${version-id}

回答by J.Mengelle

Did you try the first link in google ? http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html

您是否尝试过 google 中的第一个链接? http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html

Policy file locations are specified in the security properties file, which is located at
    java.home/lib/security/java.security  (Solaris/Linux)
    java.home\lib\security\java.security  **(Windows)**

回答by gothytim

For the Oracle JRE, on my Windows 7 system java.securityis in the following location:

对于 Oracle JRE,在我的 Windows 7 系统java.security上位于以下位置:

C:\Program Files\Java\jre7\lib\security

By the way for the JDK, should you need it, it's in:

顺便说一下 JDK,如果你需要它,它在:

C:\Program Files\Java\<jdk_version>\jre\lib\security 

e.g. C:\Program Files\Java\jdk1.7.0_40\jre\lib\security

例如 C:\Program Files\Java\jdk1.7.0_40\jre\lib\security