Maven JavaFx native libraries and OSGi

Tom Eugelink tbee at
Thu Dec 8 21:57:54 PST 2011

On 2011-12-08 22:36, Daniel Zwolenski wrote:
>     One idea is is to put all DLL's in a Maven artifact (jar) with a classifier of the platform and load them from that DLL. Workaround for this is implemented in JFXtras, but it could easily become part of the actual DLL loader.
> Would you see this extracting as only for developers or for runtime usage as well? If runtime, one thing to consider is the user may not have write permission to whatever directory the pre-loader is extracting to (e.g. unsigned app, or only admin can write to that directory).

Currently the JFXtras workaround extracts to a tempdir, but the better approach would be to load the DLL's as resources directly from the jar. No need to extract then and that also would work fine for runtime.

> Also, for all cases its worth considering possible problems relating to versioning and removing the DLLs. i.e. could be hard to work out which DLLs are being used when something goes wrong (e.g. I've got 2.0.1 dlls somewhere on my system but I'm using a 2.1 jar, etc).

The DLL are never formally installed, they just have to be present on the classpath to be loaded as a resource. Multiple jars containing the DLL's are classpath errors and should be resolved. The workaround in JFXtras extracts to a temp dir with the JFX version in the name, so that works as well.


More information about the openjfx-dev mailing list