[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Locate files into bundles using non osgi methods
- From: Thomas Watson <tjwatson@xxxxxxxxxx>
- Date: Tue, 27 May 2008 11:52:00 -0500
- Delivered-to: firstname.lastname@example.org
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.
"Piero Campanelli" ---05/26/2008 09:44:50 AM---Hi,
"Piero Campanelli" <pierocampanelli@xxxxxxxxx>
05/26/2008 09:44 AM
[equinox-dev] Locate files into bundles using non osgi methods
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
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
Have you ever tried to solve this kind of problem ?
equinox-dev mailing list