This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: Does jni work?
- To: martin dot kahlert at infineon dot com
- Subject: Re: Does jni work?
- From: Tom Tromey <tromey at redhat dot com>
- Date: 25 Jan 2001 10:33:32 -0700
- Cc: java-discuss at sourceware dot cygnus dot com
- References: <20010125150254.A5131@keksy.muc.infineon.com>
- Reply-To: tromey at redhat dot com
>>>>> "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