本文介绍了Lotus Notes:不允许访问系统属性文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我添加了此代码以将系统属性文件加载到Java Agent中,但是在访问系统属性时出现错误.
I added this code to load the system properties file in Java Agent but i am getting error as allowed to access system properties.
我想将Windows服务器中的abcd属性文件加载到C驱动器中,然后从代码中选择属性文件.
I want to load the abcd properties file which is in Windows server in C drive From there properties file is going to be picked from the code.
inp = new FileInputStream("/abcd.properties");
if(inp== null)
{
System.out.println("FIND NOT FOUND!!!!!!!!!!!");
}
else{
System.out.println("FIND FOUND");
}
p.load(inp);
System.out.println(p.getProperty("flag"));
我尝试删除
java.lang.SecurityException: not allowed to access system properties
08/22/2016 12:47:44 AM HTTP JVM: at lotus.notes.AgentSecurityManager.checkPropertiesAccess(Unknown Source)
08/22/2016 12:47:44 AM HTTP JVM: at java.lang.System.getProperties(System.java:342)
08/22/2016 12:47:44 AM HTTP JVM: at JavaAgent.NotesMain(JavaAgent.java:73)
08/22/2016 12:47:44 AM HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)
08/22/2016 12:47:44 AM HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)
推荐答案
尝试将运行时安全级别"设置为2,以允许访问文件系统:
Try setting "Runtime security level" to 2 in order to allow access to the file system:
这篇关于Lotus Notes:不允许访问系统属性文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!