Hi,
An app I am working on requires a 3rd party library (JOGL), and this library references some code in packages outside of java.*:
javax.swing
sun.awt (on Windows)
apple.awt (on OS X)
I modified my JOGL OSGi bundle's Import-Package list to include the above packages. The system bundle exports javax.swing, but not the remaining packages. I created a system bundle fragment to export
sun.nio.ch, sun.awt, and apple.awt.
So now I have three JARs: one for my app, one for the JOGL library, and one for the system bundle fragment that exports the three extra packages. If I drop these three JARs into a container like Apache Felix everything works. However, the export of sun.awt breaks something in Cytoscape. If I try to load a network I get a NullPointerException (see attached).
I noticed in Cytoscape/framework/etc/config.properties the org.osgi.framework.bootdelegation includes sun.*. However, the custom.properties file does not include sun.*. My current solution is to include sun.* in the boot delegation of the custom.properties file, remove sun.awt from the system bundle fragment's export list, and remove sun.awt from the JOGL bundle's import list.
This is not ideal because it requires users (Windows only) to modify this custom.properties file. This is an extra step in the install process, and I don't know what consequences there might be for modifying this properties file.
Any ideas?
Thanks,
Justin