native libs in modules

Johan Vos johan.vos at
Sun Apr 29 17:05:51 UTC 2018

Now that the OpenJFX SDK that works with Java 11 is about to be released in
EA, we should think about releasing the modules.

In case you download the OpenJFX SDK, running an app goes like
java --module-path $OPENJFXSDK/lib --add-modules javafx.controls

If you use gradle or maven, the same should be achieved using e.g.
dependencies {
    compile 'javafx:javafx.controls:11.0.0'

(ignore the naming and versioning for now)

This will download the javafx controls module and its dependencies from
e.g. maven central. The javafx controls module info declares a requires
entry for javafx.base and so those will be downloaded.

The question is how the native libs should be downloaded. It is possible to
bundle the native libs with the modules, but there are a number of options
for dealing with platform-specific libraries:

1. contains all native libraries for all platforms.
2. a generic module containing java code only, plus N
platform-specific modules (or jar) containing the native code. An example
of how this is used is ND4J:

To make it more complex, there are a number of options for e.g. prims
leading to a number of native libs. Do we want to include all relevant
options for all platforms?

- Johan

More information about the openjfx-dev mailing list