I understand that you can set the Java library path with an option (-Djava.library.path=/path/to/libs
) before executing the program, but is there a place on the system where Java looks if you don't set it manually?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
For Java 8, this differs based on OS. This is the behavior I observed:
java.library.path=%PATH%;.
java.library.path=$JAVA_LIBRARY_PATH:~/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
.DYLD_LIBRARY_PATH
andLD_LIBRARY_PATH
variables are ignored. Moreover, both these variables are removed from the environment of Java applications.java.library.path=$LD_LIBRARY_PATH:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
However, Matt Ball is not totally correct.
On my Linux box, my Java library path is
While my
LD_LIBRARY_PATH
is/usr/local/lib64
.Its default value depends on the operating system:
PATH
LD_LIBRARY_PATH
DYLD_LIBRARY_PATH