Description
It appears that java.library.path does not include the standard "traditional" library paths:
$ java -XshowSettings:properties
...
java.library.path = /Users/headius/Library/Java/Extensions
/Library/Java/Extensions
/Network/Library/Java/Extensions
/System/Library/Java/Extensions
/usr/lib/java
.
This is despite these such paths being provided as a default set here: https://github.com/openjdk/jdk/blob/master/src/hotspot/os/bsd/os_bsd.cpp#L326-L333
The documentation for "ld" on Darwin does indicate that "/usr/lib" and "/usr/local/lib" are default search paths.
Note also that the equivalent builds of OpenJ9 do include "/usr/lib" but not "." nor "/lib" nor "/usr/local/lib".
The only issue I could find referencing java.library.path on Darwin asked for the "." path to be added: https://bugs.openjdk.java.net/browse/JDK-7145798
This "." does appear in the current list of paths, but I am unsure if this is appropriate, given that other platforms do not appear to have this behavior.
This issue affects at least 8, 11, and 17 that I tested from Oracle, GraalVM, and Adoptium builds.
$ java -XshowSettings:properties
...
java.library.path = /Users/headius/Library/Java/Extensions
/Library/Java/Extensions
/Network/Library/Java/Extensions
/System/Library/Java/Extensions
/usr/lib/java
.
This is despite these such paths being provided as a default set here: https://github.com/openjdk/jdk/blob/master/src/hotspot/os/bsd/os_bsd.cpp#L326-L333
The documentation for "ld" on Darwin does indicate that "/usr/lib" and "/usr/local/lib" are default search paths.
Note also that the equivalent builds of OpenJ9 do include "/usr/lib" but not "." nor "/lib" nor "/usr/local/lib".
The only issue I could find referencing java.library.path on Darwin asked for the "." path to be added: https://bugs.openjdk.java.net/browse/JDK-7145798
This "." does appear in the current list of paths, but I am unsure if this is appropriate, given that other platforms do not appear to have this behavior.
This issue affects at least 8, 11, and 17 that I tested from Oracle, GraalVM, and Adoptium builds.