Java安全策略文件问题
好的,伙计们,我正在尝试让解释器使用我的 .policy 文件来完成我正在做的一些 JAAS 工作。当我尝试输入额外条目(即policy.url.3=file:/C:/Test/raypolicy ) 在我的 Windows:java.home\lib\security\java.security 文件,它拒绝保存新条目。我收到保存未成功提示,告诉我确保该程序未在其他地方打开。当然,其他地方是不开放的。
我知道这是我计算机上某个地方的错误设置,因为我可以在工作时将其保存到我的计算机上的 java 安全文件中。我的个人电脑运行 Windows 7,工作时运行 Windows XP。我还已经检查了安全文件的文件设置,并且我被设置为管理员,因此我有权更改文件等。欢迎任何和所有想法。
Okay guys, I am trying to get the interpreter to use my .policy file for some JAAS stuff I am doing. When I try to enter the extra entry (ie. policy.url.3=file:/C:/Test/raypolicy
) in my Windows:java.home\lib\security\java.security
file, it refuses to save the new entry. I get a Save not successuful prompt telling me to make sure that the program is not open in somewhere else. Of course, it is not open somewhere else.
I know that it is a wrong setting somewhere on my computer as I am able to save to my java security file on my computer at work. I am running a Windows 7 on my personal computer and a windows xp at work. I have also already checked the file settings for the security file and I am set up as the administrator so I have authority to change the file, etc. Any and all thoughts are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保以管理员身份运行用于编辑文件的编辑器(例如记事本),否则在该目录上设置的文件权限将不允许您修改该文件。
右键单击记事本,选择“以管理员身份运行”,然后在记事本中加载文件,编辑并保存它,这样就可以了。
Make sure you run the editor you use to edit the file (e.g. notepad) as Administrator -- otherwise the file permissions set on that directory will not allow you to modify the file.
Right click on notepad, select "Run as administrator" then load the file in notepad, edit it and save it and that should work.
对我有用的另一个选项是将
java.security
复制到我的桌面。One more option that worked for me was,
java.security
to my desktop.