On Mon, 1 Apr 2024 18:02:26 GMT, Martin Doerr <[email protected]> wrote:
> Now, I'm getting "java.lang.UnsatisfiedLinkError: no libname.a in
> java.library.path" when trying `System.loadLibrary("libname.a")` even though
> the file exists in the library path. Is this intended?
To load a library file, you should use `System.load(<lib-absolute-path>)`
instead.
For `System::loadLibrary` API, it loads the native library specified by the
`libname` argument. The `libname` argument must not contain any platform
specific prefix, file extension or path. See the javadoc [1].
[1]
https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/lang/System.html#loadLibrary(java.lang.String)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17945#issuecomment-2030310318