I have a legacy swing application that I need to extend with JavaFX functionality. I have been looking at using OSGi to do this (currently looking at Equinox).
The existing legacy application is dependent on a jar file, main.jar. This jar holds the interfaces required for any bundles I create to extend functionality, e.g. add new panels, menu's, etc.
The legacy application initiates the OSGi framework once it has completed it's swing tasks, registers services that implement the interfaces in main.jar, and install any bundles.
I have attempted to put this jar in the bundle, and compilation is fine, but I get a ClassCastException when retrieving the service from the OSGi registry.
What I'm not sure of is how do I configure the framework/bundles so that both the legacy application and the osgi bundles can use main.jar?