Missing something with gcj and jni - libjni.so?

Joham, David J (HP-Boise R&D) david.joham@hp.com
Fri May 13 16:33:00 GMT 2005


Hello,
I'm currently prototyping gcj on a java web server application that uses JNI. I'm using the following command to compile the application:
gcj-4 -fjni --main=hp.WebServerStartup `cat compilelist.in` --encoding=ISO-8859-1 -o webserver > foo.txt 2>&1
The compile works fine and I'm left with a webserver executable. However, when I try to run the executable, I get the following exception:
-> ./webserver
Exception in thread "main" java.lang.UnsatisfiedLinkError: libjni: libjni.so: cannot open shared object file: No such file or directory
 at java.lang.Runtime._load(java.lang.String, boolean) (/.automount/net/hpbs1964/local/home/djoham/installs/gcc/4.0-install/lib/libgcj.so.6.0.0)
 at java.lang.Runtime.loadLibrary(java.lang.String) (/.automount/net/hpbs1964/local/home/djoham/installs/gcc/4.0-install/lib/libgcj.so.6.0.0)
 at java.lang.System.loadLibrary(java.lang.String) (/.automount/net/hpbs1964/local/home/djoham/installs/gcc/4.0-install/lib/libgcj.so.6.0.0)
 at hp.WebServerStartup.loadNativeLibrary(java.lang.String) (Unknown Source)
 at hp.WebServerStartup.main(java.lang.String[]) (Unknown Source)
 at gnu.java.lang.MainThread.call_main() (/.automount/net/hpbs1964/local/home/djoham/installs/gcc/4.0-install/lib/libgcj.so.6.0.0)
 at gnu.java.lang.MainThread.run() (/.automount/net/hpbs1964/local/home/djoham/installs/gcc/4.0-install/lib/libgcj.so.6.0.0)
The problem is I can't find libjni.so anywhere on my system.
The system is a RedHat 9 machine using gcc/gcj 4.0 that was compiled with gcc 3.2.2. I built 4.0 using the following configuration:
../gcc-4.0.0/configure --prefix=/home/djoham/installs/gcc/4.0-install --program-suffix=-4 -enable-languages=java
But no libjni.so appears on my system. Surprisingly, Google hasn't been much help either so I've decided I must be so far out in the weeds it's time to ask for help. I'm totally new at gcj (and the compilation thereof) so if there is a Fine Manual somewhere that describes this, I'm happy to be directed in that direction. Any other help and pointers would be very appreciated as well...
Thanks,
David


More information about the Java mailing list

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