Bug #1835
closedcreate jni cookbook for creating jni actors
0%
Description
need to create a good readme with instructions on creating actors that can call
native code via jni.
Updated by Christopher Brooks almost 20 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.
See
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII4.0/ptII4.0.1/jni/doc/JNIActorHelp.pdf
How to use the JNI actor facility is covered in ptII/jni/demo/jni/README.htm
The release notes say:--start--
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
NameDuplicationException.
The resulting model will be missing
<property name="output" class="jni.Argument" value="false,false,true,double">
</property>
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
--end--
In addition, there are problems with the JNI interface under gcc-3.3, gcc-3.2
is recommended.
Updated by Chad Berkley almost 20 years ago
created the kepler/docs/tutorial/JNIHowTo.txt with detailed instructions on how
to create jni based actors.