JNI is the Java Native Interface, you will need to download and install the Java SDK. Note the installation directory (ie/ c:\j2sdk1.4.1_02 ) for use later. If you are using MSYS add a line similiar to the following in /etc/fstab and then restart MSYS:
In MSYS the JNI DLL can be generated using the following (NOTE: -Wl has an 'L' not a '1'):
gcc -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at -I/java/include -I/java/include/win32 -shared -o JavaImp.dll someJavaImp.c
In a standard command console it can be generated as follows (one continuous line):
gcc -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at -Ic:/j2sdk1.4.1_02/include -Ic:/j2sdk1.4.1_02/include/win32 -shared someJavaImp.c -o JavaImp.dll
Where JavaImp.dll should be named whatever you refer to the library as in your .java file. To use the above dll you would refer to it as follows in your java classes code:
System.loadLibrary( "JavaImp" );
If you encounter problems ensure your CLASS_PATH and PATH are set appropriately for your environment. Please refer to Java Native Interface for further details on using a JNI DLL in java code.