By local permissions I assume you are talking about getting the content of
the OSGI-INF/permissions.perm file.  The recommended way to get the content
of this file is to use the following

Bundle bundle = getBundle();
URL localPermissions = bundle.getEntry("OSGI-INF/permissions.perm");

The method getEntry should be used to get an entry of a bundle file instead
of getResource to handle cases where '.' (dot) is not on the
Bundle-ClassPath.  This is because getEntry just uses the raw content of
the bundle instead of using the bundle's class loader to find the resource.

HTH

Tom




|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"David Conde" <[email protected]>                                              
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"'Equinox development mailing list'" <[email protected]>               
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |06/18/2009 02:55 AM                                                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[equinox-dev] Getting local permission from a bundle programatically         
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|





Hi,

I am trying to get local permissions from a bundle by programming, is there
any way to do this?

I have found a method in Bundle class which is called “getResources (String
name)”, and I would like to know if this could be the solution.

Thanks in advance_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to