Hi felix users,

A couple of weeks I posted a question named 'Felix and javaFX/third party jars'. I found a solution, which I report here in hope it will be helpful. Please feel free to comment the taken approach. This will improve my coding/ OSGi skills :)

JavaFX (JFX) uses reflection to instantiate FX classes. As each bundle has its own class loader, classes were not found. It was reported to set the com.sun.tools.javafx.script.classpath system property or set the classpath attribute in a ScriptContext instance. The latter was not helpful as the BundleActivator is already a JFX class, not a POJO and I have no clue to implement the first. So, I took the approach to bundle the JFX SDK as an extension bundle to system.bundle and configure felix to auto-activate the wrapped JFX SDK. This works well apart from the fact that the same issue arises for my own JFX packages. I did the same trick. I bundled my own JFX packages as an extension bundle to system.bundle and the JFX bundle activator as a plain bundle. This solution works well, although I prefer to see the JFX packages and the activator in the same bundle. Maybe that is a puzzle for the next JFX release...

regards,

Eelco


Wageningen University
Plant Production Systems
P.O. Box 430
6700 AK WAGENINGEN
The Netherlands
http://www.pps.wur.nl






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to