Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Locate files into bundles using non osgi methods

We have tried to solve this issue with FileLocator. The FileLocator in org.eclipse.equinox.common bundle uses the org.eclipse.osgi.service.urlconversion.URLConverter service. If you are not running on the Equinox framework then you should be able to use the supplement bundle (http://download.eclipse.org/eclipse/equinox/drops/S-3.4RC2-200805230100/download.php?dropFile=org.eclipse.equinox.supplement_1.1.0.v20080421-2006.jar).

This bundle contains all the service interfaces which the equinox framework exports. On another framework you can install this bundle and provide your own implementation of the URLConverter for the URLs used by that framework. The org.eclipse.equinox.common bundle should find your URLConverter service and use that to convert OSGi URLs to file URLs.

Tom



Inactive hide details for "Piero Campanelli" ---05/26/2008 09:44:50 AM---Hi,"Piero Campanelli" ---05/26/2008 09:44:50 AM---Hi,


From:

"Piero Campanelli" <pierocampanelli@xxxxxxxxx>

To:

equinox-dev@xxxxxxxxxxx

Date:

05/26/2008 09:44 AM

Subject:

[equinox-dev] Locate files into bundles using non osgi methods




Hi,

I am working in an OSGi project where I have some "legacy" bundle
which has been created only to wrap an existing proprietary / old Java
library. (call this bundles "legacybundle").

LegacyBundle contains code that load configuration files using
"FileInputStream(String path)" method which prevents me from using
standard OSGi methods (for example: getResourceAsStream(....)....see
here:
http://www.eclipsezone.com/eclipse/forums/t101557.rhtml).

I fixed the problem using FileLocator which alas is Equinox
proprietary and non-OSGi portable. (to avoid code dependencies I
created a bundle which expose a PathResolverService which wraps the
trick of using FileLocator. All bundles depend from
PathResolverService).

Have you ever tried to solve this kind of problem ?

Thank you

Piero
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

GIF image

GIF image


Back to the top