Search code examples
lotus-noteslotus-dominolotusscriptlotuslotus-formula

Lotus Notes: Not allowed to access System Properties file


I added this code to load the system properties file in Java Agent but i am getting error as allowed to access system properties.

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"));

I tried removing the

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)

Solution

  • Try setting "Runtime security level" to 2 in order to allow access to the file system:

    enter image description here