Assume we have libBindingtest1p1.dylib, which links to
libtest1.dylib, i.e. requires the OS native library to load
libtest1.dylib to resolve symbols.
Usually we just se DYLD_LIBRARY_PATH including the path
where libtest1.dylib is located and we are good to go.
Just use
dynamic loading via GlueGen's ProcAddressTable
Note, the above problem does not occur when using GlueGen's
ProcAddressTable, i.e. loading the underlying tool library
libtest2.dylib w/ dlopen and passing all symbols to the JNI
library libBindingtest1p2.dylib.
Can't pass
DYLD_LIBRARY_PATH to /usr/bin/java
This is supposed to be related to MacOS's
System Integrity Protect (SIP).
Workaround
inability to pass DYLD_LIBRARY_PATH to
/usr/bin/java
Use
explicit OpenJDK/Temurin JDK java executable path
Interestingly passing DYLD_LIBRARY_PATH works using the
explicit java executable path, set by default as
follows: