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]
Other format: [Raw text]

Re: Static linking of JNI code - HOW?


>>>>> "Craig" == Craig A Vanderborgh <craigv@voxware.com> writes:

Craig> The test program was created with:
Craig>  arm-wince-pe-gcj -fjni --main=HelloWorld HelloWorld.java \
Craig>  helloworld.o -lgcj -lgcc -lc -lwinsock -lcoredll

Craig> where "helloworld.o" (lowercase) contains the native call.
Craig> What to we have to do to get JNI to work with static linking??

Something like that should work.  However:

* make sure that the required JNI function really ends up in the
  executable (it probably does)

* JNI still relies on being able to look up symbols in the
  executable.  This is probably the problem you're running into.
  You'd have to debug to make sure.  One workaround would be to use
  RegisterNatives.

Tom


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