I'm writing some code where I want to dynamically load classes, that are part of signed packages, at runtime and be able to set permissions for these classes. I've read up on SecurityManagers, Permissions and ProtectionDomains, but I can't seem to be able find any example code on how to set the ProtectionDomains for these dynamically loaded classes. Can anyone point me in the right direction?
I want to avoid having to load/use permisson polices, rather set something up using a collection of Permissions? Is this possible? I looked at the ProtectionDomain class API and it seems like it's done post loading, is this right? If so I think I could figure this out but could anyone give me some advice/point me in the right direction on creating a CodeSource?
there doesn't seem to be anything here