Am using -Xbootclasspath to add my custom jars, But this prevents loading custom JNI libraries from my user directory. Is there a work around?
Davanum Srinivas That is the intended behavior. All system classes will only lookup shared libraries in $JAVA_HOME/bin. If you do need to load custom libraries for the system classes, there are several choices.
- Install custom libraries into $JAVA_HOME/bin;
- Set the property sun.boot.library.path to include the user library path.
The syntax is
java -Dsun.boot.library.path=$JAVA_HOME/bin:$CUSTOM/bin ...