The openjfx native library cache path should be platform dependent

Glavo zjx001202 at
Thu Jan 20 05:13:14 UTC 2022

I noticed that openjfx packaged in jar caches native libraries in
~/.openjfx/cache/${version}, it is not related to the system and

It should be noted that in fact, we can start programs with different
architectures on the same system. A typical example is that Windows x86
software can be run on the Windows amd64 platform.
With the popularization of aarch64 architecture, this situation will become
more common: The software of Windows x86 and Windows amd64 can be run on
the Windows aarch64 platform, and the  software of MacOs x86 can be run on
the MacOS aarch64.

The native library file names of different schemas on the same system are
usually the same, which will cause conflicts.
For example, I tried to launch the same JavaFX application on my Windows
amd64 machine with two jdks that for x86 architecture and amd64
architecture at the same time, and it crashed:

On ARM machines, it is often necessary to run x86 applications through
translators, and such crashes may be more common.

I think openjfx should adjust the cache path of the native library, such as
This can avoid crashes and avoid openjfx repeatedly decompressing the
native library to cover the native libraries of other architectures.

I don't have a JBS account. If you need to open an issue for this problem,
please do it for me, thanks.

More information about the openjfx-dev mailing list