|Re: [equinox-dev] extending the classpath of an embedded Framework|
Unfortunately there is not a better way. At least I am not able to think of one right now. The framework has a predetermined set of packages it will export from the system bundle based on the Java SE version it has detected that it is running on. The framework does not do any kind of class path scanning to determine the list of packages that should be exported by the system bundle. Any extra packages you want to be exported by the system bundle must be configured by the launcher. This sounds exactly like what you are doing. 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:
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.
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).
Raymond Auge ---08/29/2012 11:24:24 PM---Hello All, In have an application with a large number of jars. Within that application I am initializing an embedded Framework
Raymond Auge <raymond.auge@xxxxxxxxxxx>
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>,
08/29/2012 11:24 PM
[equinox-dev] extending the classpath of an embedded Framework
8-9 October 2012 | Liferay North America Symposium | liferay.com/northamerica2012
16-17 October 2012 | Liferay Europe Symposium | liferay.com/europe2012
24-25 October 2012 | Liferay Spain Symposium | liferay.com/spain2012
equinox-dev mailing list