Oracle Java 1.8 does not lookup /usr/lib/x86_64-linux-gnu/ folder to load native library.
I have installed OpenSSL library, which is installed in /usr/lib/x86_64-linux-gnu/ folder, however while loading from Java using System.loadLibrary(), only lookup path were
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Am I missing some configuration? Updating env LD_LIBRARY_PATH works but preferred programmatic approach to avoid additional steps.
EDIT
Agreed. programmatic hack is not sustainable option. Running native executable does loads library from the arch /usr/lib/x86_64-linux-gnu/ folder. Java not looking in arch folder.