Maven JavaFx native libraries and OSGi

Tom Eugelink tbee at
Thu Dec 15 06:07:56 PST 2011

>> - the javafx.pom uses profiles (os and family) to determine what native jar
>> is needed
> What is the schema (os and family)?

         <name>Windows XP</name>

You can then add a dependency based on such a profile match. This should go a long way in fleshing out a native jar.

This naturally works for compiling, question is what to do at runtime, and I realize that is what you are trying to solve. One could naturally build per platform versions, but what would be highly unwanted IMHO. So include all natives that one wants to support in the distributable and then at runtime determine what to load using the scheme you proposed seems like a good idea.

> <PLATFORM>  [ '-'<VERSION>   [ '-'<ARCH>  - ][ '-'<CPU>  ] ]
> If none of the above working then JavaFX native libraries cannot be
> found at the appropriate place.

However, ideal would be different. Maybe it is even better to include the most important natives (like win32) and be able to download optimized natives from a central repository? (We're back at Maven.)

> The copying DLLs and share objects is a work around. What happens if
> there are other engineer who cannot copy files or rather would not
> want to for this corporate / home environment? The
> ``'' should be fixed.

I'm not use if it is possible at all to load native libs bypassing via java-library-path. But any application has access to a temp space, even in interpricy environments, so extract there and then fixing the java-library-path should work.


More information about the openjfx-dev mailing list