Project Panama & dynamic library loading
Ioannis Tsakpinis
iotsakp at gmail.com
Mon Sep 16 17:39:16 UTC 2019
On Mon, 16 Sep 2019 at 19:54, Maurizio Cimadamore
<maurizio.cimadamore at oracle.com> wrote:
>
> Interestingly, your comment on splitting artifacts by platform (not to
> have to bundle too many native libs in the same artifact) seems to point
> _against_ the notion of a multi-platform jar.
Indeed. As an example, these are the bgfx artifacts in the latest LWJGL
release:
https://repo1.maven.org/maven2/org/lwjgl/lwjgl-bgfx/3.2.3/
With such file sizes, the difference between downloading/deploying
natives for a single platform vs all 6 platforms can be significant.
Also interesting:
- We use same artifact name + different classifier for the various
platforms.
- The module-info declaration in the native jar files is identical for
all platforms. This implies that putting multiple such jars in the
module path will produce an error at JVM start-up.
- The package structure inside the native jar files allows users to
combine all natives (+ the identical module-info.class) to a single jar
file, if they so wish. It's just something that they'd have to do
manually and I'm not aware of anyone opting for such a solution.
- Ioannis
More information about the panama-dev
mailing list