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

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Nov 14 14:35:32 UTC 2025


On Thu, 13 Nov 2025 21:23:22 GMT, devjeonghwan <duke at openjdk.org> wrote:

>     1. Uncontrollable Class Loading

Wouldn't it be common to have a class in your library  _know_ developers will need to access before doing any native access? In that case, that class can have a static initializer, and you can define jar extraction logic there?

> This PR aims to eliminate such fragile post-processing.

We have other, slightly different ideas to allow for 3rd party lookups in a more robust way. The main idea is to make bindings _instance_ methods instead of static methods, have a singleton (for easy use cases), and let clients _extend_ the bindings, which might provide opportunities to hook up custom lookups. This is described briefly here:

https://mail.openjdk.org/pipermail/jextract-dev/2024-August/001920.html

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

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


More information about the jextract-dev mailing list