How to grant java permission objects?

R

Rach

Hi,

I understand that to grant a permission, one has to have a policy file and
attach the policy file either in command prompt:
e.g. java -Djava.security.policy=file.policy classtoinvoke

or in the java file:
System.setProperty("java.security.policy",
getClass().getResource("/file.policy").toString());

Can I grant a policy without a policy file? I mean, I want to hardcode the
permissions and grant them in the java class file. I know I can create
permission objects in java, but how do I grant these objects?

Thanks in advance,
-rach
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top