RFR: Add `--library-path-resolver` option for custom library path resolving

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Nov 13 12:35:56 UTC 2025


On Thu, 13 Nov 2025 12:29:35 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> So, I believe the problem is mostly with paths that are generated on the fly (e.g. because a library is extracted from the jar, and then moved to some tmp folder).

And, in this case, I believe the solution is to use whatever logic you had before FFM/jextract to extract the library into a tmp folder, then do a `System.load` on that absolute path, and then just have jextract rely on loader lookup.

In other words, jextract can be friendly w.r.t. a context where a library is extracted on the fly -- but you need to do the library loading on the application side (which, if you add a "library resolver" you'd be doing anyway?)

-------------

PR Comment: https://git.openjdk.org/jextract/pull/295#issuecomment-3527605717


More information about the jextract-dev mailing list