native library problem
I am trying to get a berkeley xml database working in java and i get an error when i try to run their sample programs. I am trying this in linux right now with problems. I got it to work in windows.
I used this command to set the native library path:
export LD_LIBRARY_PATH=/home/test/Desktop/dbxml-2.3.10/install/lib/
When i run the sample program i get this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/test/Desktop/dbxml-2.3.10/install/lib/libdb_java-4.5.so: /home/test/Desktop/dbxml-2.3.10/install/lib/libdb_java-4.5.so: cannot open shared object file: No such file or directory
[640 byte] By [
mike2148ba] at [2007-11-27 11:37:23]

well then friend, have you investigated this:
cannot open shared object file: No such file or directory
where did you use this "export LD_LIBRARY_PATH=/home/test/Desktop/dbxml-2.3.10/install/lib/"?
In your profile?
Simply typed into the terminal?
If the second, then are you using an IDE to edit and run this (your java program)?
If yes, and you typed the command in the terminal, did you do it before or after you started the IDE?
Edit: Also, to be safe, the command should be
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/test/Desktop/dbxml-2.3.10/install/lib/
i typed this ldd /home/test/Desktop/dbxml-2.3.10/install/lib/libdb_java-4.5.so
i got thislibpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaaad1a000)
libc.so.6 => /lib64/libc.so.6 (0x00002aaaaae2f000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
what does this mean
Message was edited by:
mike2148b
I ran it typed in to the terminal and then bashrc
I am trying to use the example code that comes with berkeley xml
i feel if i can get this to work i will have no problem getting my code to work
> i typed this ldd
> /home/test/Desktop/dbxml-2.3.10/install/lib/libdb_java
> -4.5.so
> i got thislibpthread.so.0 =>
> /lib64/libpthread.so.0 (0x00002aaaaad1a000)
> libc.so.6 => /lib64/libc.so.6
> (0x00002aaaaae2f000)
> /lib64/ld-linux-x86-64.so.2
> (0x0000555555554000)
>
> what does this mean
>
It just List Dynamic Dependencies... it will list "not found" if some dependent libs are not available. In your case it shows fine...
Hi here is a small program to test your env... After you set /usr/lib to LD_LIBRARY_PATH
this should work. If you dont have /usr/lib/libkdeui.so.4 try with something that you have. If this works, then dig into your program or paste the link from where did you get that.
public class Test
{
static{
System.loadLibrary("kdeui");
}
public static void main(String args[])
{
System.out.println("Library loaded...");
}
}