How to load customized native library?
Glavo
zjx001202 at gmail.com
Wed Sep 27 07:20:37 UTC 2023
>
> Do we have something like System.loadLibrary, or respect the effect of
> System.load/System.loadLibrary?
See SymbolLookup.loaderLookup()
Glavo
On Wed, Sep 27, 2023 at 2:50 PM tison <wander4096 at gmail.com> wrote:
> I'm using OpenJDK 21.
>
> Previously, I used System.load or System.loadLibrary to load native
> library said "opendal_java".
>
> Now, with Linker.nativeLinker().defaultLookup(), the `find' result is
> empty even if I call System.load property first.
>
> I read the code and it seems the defaultLookup only always look
> up syslookup lib only.
>
> Thus, the only way I found to properly load customized native library is:
>
> final SymbolLookup lookup =
> SymbolLookup.libraryLookup(absolutePathToNativeLib), arena);
>
> Do we have something like System.loadLibrary, or respect the effect of
> System.load/System.loadLibrary?
>
> Best,
> tison.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20230927/1dc98d36/attachment.htm>
More information about the panama-dev
mailing list