Problem loading libs via /etc/ld.so.conf

L

Laurenz Albe

I am using Sun Java 1.4.2_05-b04 on a RedHat Enterprise Server 3 Linux
machine, Kernel 2.4.21, glibc 3.2.3.

I am trying to load the shared library that belongs to a native method.


When Java is started with

LD_LIBRARY_PATH=/path/to/lib java MyClass
or
java -Djava.library.path=/path/to/lib MyClass

everything works fine.


However, when I add /path/to/lib to /etc/ld.so.conf and run 'ldconfig',
Java does not find the library when run as

java MyClass

and reports an UnsatisfiedLinkError.

This happens only with Java, other programs find the libraries fine, and
the loader shows the libraries correctly when queried with 'ldconfig -p'.


Does anybody have an idea what is wrong?

Thank you,
Laurenz Albe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top