This is the mail archive of the
frysk@sourceware.org
mailing list for the frysk project.
got JNI; but only just :-)
- From: Andrew Cagney <cagney at redhat dot com>
- To: frysk <frysk at sources dot redhat dot com>
- Date: Fri, 11 Apr 2008 17:32:23 -0400
- Subject: got JNI; but only just :-)
FYI,
I've just pushed changes to frysk's build system that add the ability to
build JNI code vis:
- automatically generate required jni headers
- compile */jni/*.cxx files into a separate shared object
while at the same time continuing to build the existing CNI code. By
being able to build/run both side-by-side we'll hopefully help to ease
the migration pain.
In the frysk-sys directory, I've also added stub C++ JNI functions (they
just throw an exception) for all the required native methods. You can
invoke TestRunner, but using JNI and these stub-functions, with the
script JniRunner vis:
$ ./JniRunner
Exception in thread "main" java.lang.RuntimeException:
../../frysk/frysk-sys/frysk/config/jni/Config.cxx:Java_frysk_config_Config_createBuildConfig
not implemented
at frysk.config.Config.createBuildConfig(Native Method)
at JniRunner.main(JniRunner.java:57)
(Did I mention that all the JNI functions were stubs and just threw
exceptions? :-)
Next I'm going to work my way through frysk.config, frysk.rsl, and
frysk.sys.
The lib/* libraries are an opportunity waiting to happen :-)
Andrew