This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: trouble compiling app w/ jni
- To: <stewart at neuron dot com>, <java at gcc dot gnu dot org>
- Subject: RE: trouble compiling app w/ jni
- From: "Anthony Green" <green at redhat dot com>
- Date: Sat, 14 Apr 2001 06:10:38 -0700
- Reply-To: <green at redhat dot com>
Stewart wrote:
> and the LD_LIBRARY_PATH is set correctly. foo.class is dependent on
> syscall.class which contains native methods and uses libsyscall.so
> (sucessfully compiled).
You need to compile syscall.class with -fjni. The documentation says:
"With gcj there are two options for writing native methods: CNI and JNI. By
default gcj assumes you are using CNI. If you are compiling a class with
native methods, and these methods are implemented using JNI, then you must
use -fjni. This option causes gcj to generate stubs which will invoke the
underlying JNI methods."
AG