[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Recipe to get extension bundle classes on the class path

I'm still struggling with the extension bundle and class path problems
I wrote about a couple of weeks ago:

  System and context class loaders
  http://thread.gmane.org/gmane.comp.ide.eclipse.equinox.devel/1651/focus=1743
    http://article.gmane.org/gmane.comp.ide.eclipse.equinox.devel/1743
    http://article.gmane.org/gmane.comp.ide.eclipse.equinox.devel/1746
    http://article.gmane.org/gmane.comp.ide.eclipse.equinox.devel/1747
    http://article.gmane.org/gmane.comp.ide.eclipse.equinox.devel/1748

My goal is to take some classes that I have packaged in a framework
extension bundle and make them visible to a Java library that searches
for classes both in the System Class Loader and the Thread Context
Class Loader -- the java.util.logging library being my first example.

According to Section 3.15.1 ("Illegal Manifest Headers for Extension
Bundles") of the OSGi Core R4 specification, classes exported from a
framework extension bundle must be exported by the System Bundle:

,----[ Section 3.15.1 ]
| Both boot class path and framework extension bundles are permitted to
| specify an Export-Package header. Any exported packages specified by a
| framework extension bundle must be exported by the System Bundle when
| the extension bundle is resolved.
`----

How does being "exported by the System Bundle" relate to which classes
are visible to bundles that use ClassLoader.getSystemClassLoader() or
Thread.currentThread().getContextClassLoader()?

As the four articles mentioned above show, I'm in need of some recipe
to coordinate all of these class loading options. Please advise.

-- 
Steven E. Harris