Loading library with absolute path

Lars Andersen lars@rimfaxe.com
Sun Mar 16 11:12:00 GMT 2003


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /