From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Croft To: insight@sources.redhat.com Subject: JNI debugging, "error while loading shared libraries" Date: Fri, 24 Aug 2001 19:52:00 -0000 Message-id: <3B87129E.5020801@mitem.com> X-SW-Source: 2001-q3/msg00197.html I'd like to use insight to debug our Java JNI native functions, written in C. A very tiny test program (below), runs fine without insight ("java hi" from the shell). public class hi { public static void main(String[] args) { System.out.println("hello world"); } } But firing up java with insight (the java wrapper looks at export DEBUG_PROG=gdb), gets the following error as soon as I "run hi" from the gdb console: /usr/share/jbuilder5/jdk1.3/bin/i386/native_threads/java: error while loading shared libraries: libhpi.so: cannot load shared object file: No such file or directory ---- Do you have any ideas or workarounds? I put a "sh -x" on the java wrapper and it IS setting up LD_LIBRARY_PATH correctly. Otherwise it wouldnt work in the case without insight. I even tried manually adding the java libdirs to /etc/ld.so.conf, that didnt work either. I'm running insight+dejagnu-20010703 BTW, I get the same failure from insight in "-nw" no windows mode. And from gdb 5.0rh-5. The OS here is RH7.1. Thanks for your ideas. --William