Project

General

Profile

Actions

Bug #1835

closed

create jni cookbook for creating jni actors

Added by Chad Berkley over 19 years ago. Updated over 19 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
general
Target version:
Start date:
12/15/2004
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
1835

Description

need to create a good readme with instructions on creating actors that can call
native code via jni.

Actions #1

Updated by Christopher Brooks over 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.
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
  1. 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.
  2. 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>

We are working with the original authors on a solution.
In the short term, one workaround is to edit the xml file directly and add the
appropriate property by hand.
  1. 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.

Actions #2

Updated by Chad Berkley over 19 years ago

created the kepler/docs/tutorial/JNIHowTo.txt with detailed instructions on how
to create jni based actors.

Actions #3

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 1835

Actions

Also available in: Atom PDF