You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Fabien Barbero <fa...@gmail.com> on 2009/01/12 18:03:59 UTC

Exporting resources from bundle

Hi,
For my application I need to export some resources from my Felix Bundle.
In fact, I need to load some resources, from my bundle, to a "manager" which
is located to the SystemClassLoader.
Is there a way to do this ?

Fabien

Re: Exporting resources from bundle

Posted by Guillaume Sauthier <Gu...@objectweb.org>.
Your resources also need to be in a package/directory
If they are at the root of your bundle (default package), it will not 
work because default package is never exported.

--Guillaume

Richard S. Hall a écrit :
> Exporting and importing resources are no different than with classes, 
> simply export and/or import the package containing the resources. If 
> you are exporting resources from the system class path, then you will 
> want to add the resource package to the 
> org.osgi.framework.system.packages.extra property (assuming you are 
> using Felix 1.4.x).
>
> -> richard
>
> Fabien Barbero wrote:
>> Hi,
>> For my application I need to export some resources from my Felix Bundle.
>> In fact, I need to load some resources, from my bundle, to a 
>> "manager" which
>> is located to the SystemClassLoader.
>> Is there a way to do this ?
>>
>> Fabien
>>
>>   
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>



Re: Exporting resources from bundle

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Exporting and importing resources are no different than with classes, 
simply export and/or import the package containing the resources. If you 
are exporting resources from the system class path, then you will want 
to add the resource package to the 
org.osgi.framework.system.packages.extra property (assuming you are 
using Felix 1.4.x).

-> richard

Fabien Barbero wrote:
> Hi,
> For my application I need to export some resources from my Felix Bundle.
> In fact, I need to load some resources, from my bundle, to a "manager" which
> is located to the SystemClassLoader.
> Is there a way to do this ?
>
> Fabien
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Exporting resources from bundle

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Fabien Barbero schrieb:
> I used "Export-Package", but it doesn't works.
> I see my resources in my bundle, but I can't load them :-(

Have you correctly created Export-Package _and_ Import-Package headers ?

For example, if your property is in the sample/resources folder, you should

   Export-Package: sample.resources

in your providing bundle and

   Import-Package: sample.resources

in your using bundle.

Regards
Felix

> 
> 
> 
> 2009/1/12 Abdel Olakara <ol...@gmail.com>
> 
>> Hi Fabien,
>>  Wouldn't it be enough that you use Export-Package in the manifest file to
>> export the resource?
>> Please correct me if I am wrong.
>>
>>
>> On Mon, Jan 12, 2009 at 9:03 PM, Fabien Barbero <fabien.barbero@gmail.com
>>> wrote:
>>> Hi,
>>> For my application I need to export some resources from my Felix Bundle.
>>> In fact, I need to load some resources, from my bundle, to a "manager"
>>> which
>>> is located to the SystemClassLoader.
>>> Is there a way to do this ?
>>>
>>> Fabien
>>>
>>
>>
>> Thanks and Regards,
>> -- Abdel Raoof Olakara
>> olakara@gmail.com
>> http://technopaper.blogspot.com
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Exporting resources from bundle

Posted by Fabien Barbero <fa...@gmail.com>.
I used "Export-Package", but it doesn't works.
I see my resources in my bundle, but I can't load them :-(



2009/1/12 Abdel Olakara <ol...@gmail.com>

> Hi Fabien,
>  Wouldn't it be enough that you use Export-Package in the manifest file to
> export the resource?
> Please correct me if I am wrong.
>
>
> On Mon, Jan 12, 2009 at 9:03 PM, Fabien Barbero <fabien.barbero@gmail.com
> >wrote:
>
> > Hi,
> > For my application I need to export some resources from my Felix Bundle.
> > In fact, I need to load some resources, from my bundle, to a "manager"
> > which
> > is located to the SystemClassLoader.
> > Is there a way to do this ?
> >
> > Fabien
> >
>
>
>
> Thanks and Regards,
> -- Abdel Raoof Olakara
> olakara@gmail.com
> http://technopaper.blogspot.com
>

Re: Exporting resources from bundle

Posted by Abdel Olakara <ol...@gmail.com>.
Hi Fabien,
 Wouldn't it be enough that you use Export-Package in the manifest file to
export the resource?
Please correct me if I am wrong.


On Mon, Jan 12, 2009 at 9:03 PM, Fabien Barbero <fa...@gmail.com>wrote:

> Hi,
> For my application I need to export some resources from my Felix Bundle.
> In fact, I need to load some resources, from my bundle, to a "manager"
> which
> is located to the SystemClassLoader.
> Is there a way to do this ?
>
> Fabien
>



Thanks and Regards,
-- Abdel Raoof Olakara
olakara@gmail.com
http://technopaper.blogspot.com