This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: trouble compiling app w/ jni


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]