1

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?

Matteo
  • 1,367
  • 7
  • 25

1 Answers1

0

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.

BJ Hargrave
  • 9,324
  • 1
  • 19
  • 27
  • Actually, I did not tell my rcp app to use any kind of security manager, but I think that the production enviroment for eclipse's rcp / p2 requires it, hence I do not want to disable it and I would instead configure the permissions of my app... Do you have any link to a tutorial / guide / whatever about ConditionalPermissionAdmin? – Matteo Oct 24 '11 at 08:08
  • As you said, permissions are not being evaluated without a permission manager... and with some debugging within the eclipse's code I found that the problem was not a misconfigured security policy , – Matteo Oct 25 '11 at 07:56
  • As you said, permissions are not being evaluated without a permission manager... and with some debugging within the eclipse's code I found that the problem was not a misconfigured security policy... (but the effects of my error was not documented in the javadoc) – Matteo Oct 25 '11 at 07:56
  • So what was the problem you found? I'm hitting the same issue. – James Moore Feb 01 '12 at 00:59