wood burning stoves 2.0*
The moose likes Java in General and the fly likes Security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Security" Watch "Security" New topic


Kumar Kausikasa
Ranch Hand

Joined: Jun 04, 2002
Posts: 45
I did not see special security forum, so i am posting here. Sorry if this an irrelevant one.
Here is my problem:
When i want to use a policy file, i do this while starting the JVM :-
java -Djava.security.policy=the security policy i want to use.
But istead of giving on the command line while running, I want to include this in the program itself , how can i do this?
since i am setting a property which is "java.security.policy", i saw the API of java.security.Policy, but could not figure it out how to do
Can someone help me
Thanks for your time
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9044
Moving to Java in General (Intermediate)

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Try this:


Regards, Rene Larsen
Dropbox Invite
jQuery in Action, 2nd edition
subject: Security
Similar Threads
java.rmi.ConnectException: Connection refused to host
Is it possible to put policy file in program?
RMI Example
setting codebase and policy
Problem with Sun's Bootstraping Example