Search code examples
eclipseswingosgiclassloaderequinox

Who loads javax.swing.* classes in Equinox osgi container?


I read some equinox code and doc. I came to understand that, at present, only class loading for java.* packages are delegated to the parent classloader(given that i have not modified org.osgi.bootdelegation property, which by the way seems to be null). Then who is loading the javax.swing.* classes. I have not mentioned it anywhere in the imported packages/ required bundles, but still it loads just fine. I wanted to know who the heck is "formally" responsible for loading it? Thanks a lot in advance.


Solution

  • From this thread:

    equinox knows about spec'ed packages from the JRE for a given JSE level. These spec'ed packages are automatically exported by the Equinox system.bundle depending on the execution environment level you are at (e.g. J2SE-1.3, J2SE-1.4 etc.)

    So as long as you define a "org.osgi.framework.executionenvironment", equinox should load the right JVM packages and export them for consumption by the bundles.