Вопрос

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