I’ve created a RCP application with a plugin that requires to invoke the method Bundle.findEntries. In debugging mode (i.e., when I launch my app from eclipse) everything works correctly, but when I run the “real” application (i.e., I export the RCP app and I run it) the method stops working and returns null.
From the documentation I read that the method returns null “if the caller does not have the appropriate AdminPermission[this,RESOURCE], and the Java Runtime Environment supports permissions.“
How can I grant such permission to my app?
If you are running with a Security Manager installed, then you will need to grant permissions to each bundle. The ConditionalPermissionAdmin service is the best way.
If you are not running with a Security Manager, them permissions are not being evaluated.