How to dispatch the same method call on different platforms?

Pedro Lamarão pedro.lamarao at prodist.com.br
Mon Feb 19 15:25:17 UTC 2024


Em dom., 18 de fev. de 2024 às 08:38, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> escreveu:

> On Linux, you can do `loaderLookup("libc.so.6")` and that works fine - no
> custom logic is needed. The problem of shipping native libraries into maven
> modules, on the other hand, is one that still requires manual workarounds.
> But I believe that to be more a problem of the tool we're "forced" to work
> with (Maven/Gradle): there's _no sane way_ to load a shared library from a
> zip file (or from some random memory address). Meaning that, to do that,
> you need to copy the library _somewhere_ before loading, which can come
> with its own set of issues (e.g. no write access, not even to "/tmp"). A
> qualitatively better solution would be to use jmods and custom JDK images
> (with jlink) which can deal with native libraries just fine, but
> unfortunately these things are not supported by the build tools we have
> today. This is another of these follow-up activity that will likely fall
> out from the initial FFM addition.
>

Is there an appropriate place to send "enhancement requests" to jlink?
This discussion has reminded me of blockers to the adoption of jlink in my
work, and perhaps it is time to express them.
I am familiar with Gradle and the community "jlink" plugin, and would be
interested in sending them PRs on these topics.
My shop does JCA providers and currently jlink does not properly embed
those.

-- 
Pedro Lamarão
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20240219/57448c94/attachment-0001.htm>


More information about the panama-dev mailing list