We would not do this in the framework delegation (BundleLoader) by default because it would expose classes to bundles which have no defined dependencies on the package (e.g Import-Package: javafx.*). Bundles should declare their dependencies on the packages they require to function. Providing the bundles with packages for free will allow them to "work" but they will then fail with class loading issues on platforms that do not have javafx.
Tom From: Doug Schaefer <[email protected]> To: Equinox development mailing list <[email protected]>, Date: 02/25/2014 11:01 AM Subject: Re: [equinox-dev] Simpler JavaFX class loading Sent by: [email protected] PDE wouldn¹t let me export packages not defined in my plug-in. BTW, I¹ve created a pretty simple class loading hook that works. I¹m actually surprised the BundleLoader doesn¹t try something like this in it¹s search algorithm. @Override public Class<?> postFindClass(String name, ModuleClassLoader classLoader) throws ClassNotFoundException { if (name.startsWith("javafx.") || name.startsWith("com.sun.glass") || name.startsWith("com.sun.javafx")) { return ClassLoader.getSystemClassLoader().loadClass(name); } else { return null; } } On 2/25/2014, 11:43 AM, "Alex Blewitt" <[email protected]> wrote: >Can you not just install a fragment to the system bundle that exports the >javafx packages? > >Sent from my iPhone 5 > >> On 25 Feb 2014, at 16:15, Doug Schaefer <[email protected]> wrote: >> >> Hey gang, >> >> I¹m aware of the work Tom S has done with class loading hooks to get >>JavaFX classes to load. I¹m just wondering if there are easier >>approaches we could be following, something we can put in the >>JavaSE-1.8.profile file or somewhere else so that we can make this a >>more data driven approach. It¹s a pain to have to set the >>osgi.framework.extensions property for every product we want to build >>with JavaFX support. I¹m aware that not every 1.8 VM will have JavaFX in >>it, but for those that do, I¹d love to see this support enabled >>automagicly. Any thoughts? >> >> Thanks, >> Doug. >> _______________________________________________ >> equinox-dev mailing list >> [email protected] >> https://dev.eclipse.org/mailman/listinfo/equinox-dev >_______________________________________________ >equinox-dev mailing list >[email protected] >https://dev.eclipse.org/mailman/listinfo/equinox-dev _______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
<<inline: graycol.gif>>
_______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
