문제

It has been suggested that part of the solution of the problem with javafx classloading and osgi is to move jfxrt to the Java installation lib/ext directory so that it is loaded when the JVM starts.

If this is done in a private install of Java the javafx classes are available at design time but are not found at run time when a javafx bundle is installed.

Is it possible that this can be made to work?

I am using felix and bndtools in eclipse as dev environment on Ubuntu 12.04.

도움이 되었습니까?

해결책

First, the bundles that are using javafx packages must import them with Import-Package.

Next you need to get the system bundle to export the packages. By default the system bundle only exports the standard JRE packages plus the OSGi framework packages; you can extend this by setting the property org.osgi.framework.system.packages.extra. Since you are using Bndtools (good!) you can set the property as follows:

-runsystempackages: javafx.foo,javafx.bar...

다른 팁

I have recently released a first Early Access version of Drombler FX, a modular Rich Client Platform for JavaFX based on OSGi and Maven (POM-first).

You can read more about it here: http://puces-blog.blogspot.ch/2012/12/drombler-fx-building-modular-javafx.html

Getting Startet: http://wiki.drombler.org/GettingStarted

The generated output is explained here: http://wiki.drombler.org/GettingStarted#drombler-fx-sample-application-the-binaries-explained

(I didn't have to move any JavaFX JARs.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top