I am trying to use JavaFX 2 from a simple eclipse view, but I am getting an
java.lang.UnsatisfiedLinkError: Invalid URL for class: bundleresource://435.fwk1827795025/com/sun/glass/utils/NativeLibLoader.class
After some investigation with JAD I have found out that NativeLibLoader has very interesting check:
if(!classUrlString.startsWith("jar:file:") || classUrlString.indexOf("!") == -1) throw new UnsatisfiedLinkError((new StringBuilder()).append("Invalid URL for class: ").append(classUrlString).toString());
Does this mean that javafx can't be used from OSGi bundle? Please prove me wrong.
Updates to the JavaFX loader to be more friendly with OSGI are scheduled for the "Lombard" release (which is the JavaFX 3.0 timeframe, i.e. 2013). Until then, you may encounter issues working with JavaFX from an OSGI bundle. Other OSGI related issues can be found by searching for OSGI in the JavaFX Jira (anybody can signup to view the bugs and issues listed there). Tom Schindl, the creator of the e(fx)clipse plugin for JavaFX in Eclipse, would be the best contact point with experience in integrating JavaFX within Eclipse.