Does jni work?
Tom Tromey
tromey@redhat.com
Thu Jan 25 09:08:00 GMT 2001
>>>>> "Martin" == Martin Kahlert <martin.kahlert@infineon.com> writes:
Martin> libsample.so: sampNat.c sample.h
Martin> gcc -shared -fPIC -o $@ $<
Here you build a library named `libsample.so'...
Martin> static {
Martin> System.loadLibrary("sampNat");
Martin> }
Martin> }
... but here you try to load it with a different name
Martin> Exception in thread "main" java.lang.UnsatisfiedLinkError: sampNat: file not found
... which is what the exception tells you.
Martin> Did i make any mistake, or is this known not to work?
JNI ought to work. The invocation API won't work. And there might be
bugs; some testing has been done but it hasn't really been used for
real (as far as I know).
Tom
More information about the Java
mailing list