views:

22

answers:

1

Hi there!

I'd like to know if there is a way to use multiple security managers in java, and if so, how to specify them a particular .policy file?

I've been looking at the java se 6 doc about Security, but couldn't find any answer there...

Thanks everyone for help!

+1  A: 

The design of Java is such that only one SecurityManager can be installed at a time (but I suppose you could write your own composite that requires all its atomic managers to agree… but why?)

However, it is possible to have many different policies applied by the security manager so that code that is from one location or which is published by a particular individual has access to one set of capabilities, and code from elsewhere can do something else.

Donal Fellows
Thanks for your helpful answer! I think that I have to work on my policies files.
YoannCh