[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] extending the classpath of an embedded Framework

On Thu, Aug 30, 2012 at 9:14 AM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:
One other way you could accomplish this is by installing system.bundle fragments that are completely empty except for the META-INF/MANIFEST.MF. ÂIn the bundle manifest you would specify the exported packages. ÂSo you could have a "companion" system bundle fragment for each additional jar that is on the framework class path and each one would have something like this in their bundle manifest:

Bundle-ManifestVersion: 2
Bundle-SymbolicName: foo
Bundle-Version: 1.0
Fragment-Host: system.bundle
Export-Package: some.foo.stuff. some.more.foo.stuff

Just an idea, but then you could put these manifests in your "external" jars and at launch discover the fragment bundle manifests and ensure that their companion is installed in the framework. ÂYou could even generate the companion (empty) fragment bundle on the fly and install it. ÂBut I am not really sure that sounds much better than what you are currently doing.

I think I'm going to try this (on the fly fragment creation), as it would seem to address my greatest issue which is merging all the package/versions among all the different "classpath" jars I want to export. By simply isolating each set of imports to it's own fragment it allows me to avoid that complication.
Â

You mention the osgi.frameworkClassPath property. ÂThis property is not actually used by the core osgi framework. ÂInstead it is used by our equinox launcher to specify a specific framework (org.eclipse.osgi) jar to launch with Â(see http://git.eclipse.org/c/equinox/rt.equinox.framework.git/tree/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java).

Ok, that clears that up.

I'll try this. I just wanted to see if there was perchance a mechanism in equinox that could help.

If all else fails, I may resort to bnd manifest calculation which is another option (passing the "classpath" jars as though they were embedded).

Thank you
--
Ray