Hi Vincent, I went ahead and made a number of fixes to the JNI facility and it now works much better under Windows with Cygwin.
1) Set up a launcher, which solves the JNI/Cygwinw problem Details are below. 2) Fixed the configuration so that now instead of there being a separate JNI menu choice, one just drags in a JNICodeGenerator. When one clicks on the JNICodeGenerator, it brings up a window that has buttons that displays the build output. 3) Added a separate configuration dialog for GenericJNIActor. If one double clicks on the GenericJNIActor, a custom dialog pops up. This dialog has two buttons, one to bring up the standard parameter configuration window and another to configure the native method arguments 4) A number of fixes so that the native method arguments are preserved and the topology is recreated. These changes are checked in to the Ptolemy II CVS repository, see http://chess.eecs.berkeley.edu/ptexternal. If you are trying to use JNI, you should definitely use the CVS version, the Ptolemy II 4.0 and 5.0 versions are buggy. The details about the launcher are summarized below: > Ok, I got around to trying the Java Launcher for JNI > programs that was described in > http://elliotth.blogspot.com/2005/08/porting-jni-code-to-win32-with-cygwin.html > I downloaded some C code from > http://software.jessies.org/terminator/ > checked it in to ptII/jni/launcher and after a little cleaning, I > was able to run the meaningOfLife demo under Windows. > > The launcher program is a C program that invokes > Java that then allows Java to invoke JNI programs > under Cygwin. Without this launcher program, under Windows > with Cygwin, any Ptolemy model that uses the JNI actors or > the Ptolemy Matlab actor exits violently. > > The launcher program takes an argument that names the > class with a slash separated name. Also, thee class path > must be passed in as a property. > For example, to run "vergil -jni", we do: > $PTII/jni/launcher/launcher -Djava.class.path="$PTII" > ptolemy/vergil/VergilApplication -jni > > The launcher can be used to solve the problems we were > having with Viptos under Windows. > Also, it should help with the Matlab interface. > > One side effect is that since we now need a custom launcher for the > Matlab actor, the InstallAnywhere LaunchAnywhere binary is probably > not going to cut it for us. This means will need a new installer. If > we don't need the Matlab actor, then InstallAnywhere can still be > used. _Christopher ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]