Thank you for your interest in this article. Most of the development for this pattern was done on Sun Solaris platforms but I put together some Microsoft Visual Studio 6.0 projects in this zip file because of the number of request I've received. These implementations are not as rigorously tested or maintained as the ones in our lab so user beware. Please direct any comments, questions or bug reports to timothy.culp@computer.org or tculp@harris.com.
The code is not very well documented since it is discussed in detail in the article. There are some strategic comments when the implementation starts to get hairy. If you are just interested in running the JBatteryMonitor example, follow these steps:
% setenv JAVA_DEV_ROOT C:/softtrac1.1 % cd $JAVA_DEV_ROOT/src/com/softtrac/jni/example % java -classpath $JAVA_DEV_ROOT/classes com.softtrac.jni.example.JBatteryMonitor 100The output to the screen is intentionally being displayed to reinforce what is happening behind the scenes. These are trace statements that can be turned off in the code once it's obvious the objects are successfully communicating through JNIS.
In addition to the JBatteryMonitor application, there is also a prototype for the popular PalmPilot game called NoMess. It is not a complete implementation but was done to challenge the JNIS design a little more than the simple battery monitor. The rules for NoMess can probably be found somewhere on the net. The basic rules of the game is to try to get 5 or more symbols in a row, col or diagonal. Doing so will clean them off the board. Every move you make adds three more pieces (except for when you get 5 in a row). The trick is to last as long as possible before the board fills up.
If you want to build the software or make modifications, you will need to install cygwin in order for the Makefiles to work. The Makefiles are for building the java components, the C++ libraries are built with Visual Studio. This is just a prototype baseline so chances are you will have to make changes in your environment in order for everything to work, Here are some instructions to get you started:% cd $JAVA_DEV_ROOT/src/com/softtrac/nomess % java -classpath $JAVA_DEV_ROOT/classes com.softtrac.nomess.NoMess 9
JAVA_HOME = /cygdrive/c/java/jdk1.3.0_02
CYGWIN_HOME = /cygdrive/c/cygwin
% cd $JAVA_DEV_ROOT/src/com/softtrac/jni/example % make
C:\JAVA\JDK1.3.0_02\INCLUDE C:\JAVA\JDK1.3.0_02\INCLUDE\WIN32
Creating library Debug/jni.lib and object Debug/jni.exp jni.dll - 0 error(s), 0 warning(s)
% make run