This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Loading library with absolute path
- From: Lars Andersen <lars at rimfaxe dot com>
- To: java at gcc dot gnu dot org
- Date: 16 Mar 2003 12:12:55 +0100
- Subject: Loading library with absolute path
Using the GCC-20030310 snapshot on linux.
I'm trying to load a library using Runtime.load(String filename);
This should load the library pointed to by filename :
Runtime.load("/home/lars/projects/rws/libservlets.so");
However i get an UnsatifiedLinkException :
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/lars/projects/rws/libservlets.so:
libgcj.so.4: cannot open shared object file: No such file or directory
at java.lang.Runtime._load(java.lang.String, boolean)
(/home/lars/projects/gcc/libjava/gcj/cni.h:64)
at java.lang.Runtime.load(java.lang.String)
(/home/lars/projects/gcc/libjava/java/lang/Runtime.java:624)
, and yes, I'm sure that the file exists.
I have also tried adding the directory to LD_LIBRARY_PATH and running :
Runtime.load("libservlets.so");
with the same result.
/Lars Andersen