create jni cookbook for creating jni actors
need to create a good readme with instructions on creating actors that can call
native code via jni.
Updated by Christopher Brooks about 19 years ago
Perhaps some of the resources below can be used as a starting point.
The Matlab actor uses JNI.
Ptolemy II includes a JNI actor facility, but the UI is broken right now.
How to use the JNI actor facility is covered in ptII/jni/demo/jni/README.htmThe release notes say:
Limitations in JNI
- The Interface to C actors using the Java Native Interface is not available via
the Windows Installer (or Web Start). To use the JNI/Ptolemy II interface, you
must download Ptolemy II as source files and compile.
- The JNI user interface does not permit creation of new JNI actors.
If you follow the instructions in JNIUtilities, then eventually you will get a
The resulting model will be missing
<property name="output" class="jni.Argument" value="false,false,true,double">
In the short term, one workaround is to edit the xml file directly and add the
appropriate property by hand.
- JNI will not work with Hierarchical classes, subclasses, and inner classes
In addition, there are problems with the JNI interface under gcc-3.3, gcc-3.2