Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

chaam Mangaleswaran

Greenhorn
+ Follow
since Sep 14, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by chaam Mangaleswaran

Hi,
I am trying to load different policy file during run time. I am trying to have different policy files for different users in my system. Hence I'm checking their ID and with the ID Key I'm trying to set a policy file ( something like policy.url.ID) I am trying to set the policy URLs using the method System.setProperty("java.security.policy",url). But I don't have the privilege to do so(I'm getting java.security.AccessControlException )
When I set the policy URLs are set I was trying to set the policy file using Policy.setPolicy(Policy p ) I want to know where I went wrong and what will be the best way to set java policy files in run time ?
9 years ago