Java.policy settings to run java agent on server

Hi,

I have a scheduled java agent that, when run on the server, returns the following error in the log:

AMgr: Agent (‘agentname’ in ‘des\testbk.nsf’) printing:

Exception:java.lang.SecurityException: not allowed to access system properties

The agent craps out at:

System.getProperties().put(“proxySet”, “true”);

By adding permission java.security.AllPermission; to the grant { … } statement of the java.policy document, the agent runs fine.

I was wondering if there were specific commands that I could use inside the grant { … } statement instead of the more wide open permission java.security.AllPermission; command?

Jason

Subject: java.policy settings to run java agent on server

This should work:

permission java.util.PropertyPermission “proxySet”, “write”;

dgg

Subject: RE: java.policy settings to run java agent on server

It didn’t work unfortunately. I also tried:permission java.util.PropertyPermission “*”, “read, write”;

Jason

Subject: RE: java.policy settings to run java agent on server

Try this instead:

System.setProperty(“proxySet”, “true”);

And if you haven’t already, restart the server - it should work.

dgg

Subject: RE: java.policy settings to run java agent on server

Thanks a bunch Dallas, it worked!