<div dir="ltr"><div class="gmail_default" style="font-family:arial,sans-serif">The other point is that if java.library.path still valid in FFM flow. Otherwise, the conventional method to specify loading path should be changed to some unstandard solution.</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><font face="arial, sans-serif">Best,</font></div><div><font face="arial, sans-serif">tison.</font></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">tison <<a href="mailto:wander4096@gmail.com">wander4096@gmail.com</a>> 于2023年9月27日周三 14:49写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,sans-serif">I'm using OpenJDK 21.</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">Previously, I used System.load or System.loadLibrary to load native library said "opendal_java".</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">Now, with Linker.nativeLinker().defaultLookup(), the `find' result is empty even if I call System.load property first.</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">I read the code and it seems the defaultLookup only always look up syslookup lib only.</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">Thus, the only way I found to properly load customized native library is:</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">final SymbolLookup lookup = SymbolLookup.libraryLookup(absolutePathToNativeLib), arena);<br></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif">Do we have something like System.loadLibrary, or respect the effect of System.load/System.loadLibrary?</div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><font face="arial, sans-serif">Best,</font></div><div><font face="arial, sans-serif">tison.</font></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>