Unresolved JavaFX packages in OSGi Felix Application

こ雲淡風輕ζ 提交于 2019-12-04 10:43:39

The OSGi spec requires that bundles must import all packages that don't start with "java.". So you do need to import packages that start with "javax.". So now you need an exporter and a source for the packages. -Dorg.osgi.framework.bundle.parent=ext gives you a source for the packages since the ext classloader loader is includes in the bundle parent. But the framework resolver still needs to have an exporter for the package to know that the bundle's imports are properly resolved. This is why you need -Dorg.osgi.framework.system.packages.extra=javafx.stage.

I've released some Early Access versions of Drombler FX, a new Rich Client Platform for JavaFX based on OSGi (Apache Felix) and Maven.

As an application framework it makes sure JavaFX and OSGi will get started properly and it provides the main window.

You can read more about Drombler FX here: http://puces-blog.blogspot.ch/search/label/Drombler

There's a Getting Started page which explains how to create, build and run a Drombler FX sample application with a few simple steps.

Please note that there is currently a critical bug in the Docking Framework because of a bug in JavaFX. That bug should be fixed in the Java SE/ JavaFX 8u40 release however (expected release date: March 2015).

Adding these two VM arguments fixed it for me:

-Dorg.osgi.framework.bundle.parent=ext  
-Dorg.osgi.framework.system.packages.extra=javafx.* 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!