The steps you need to take are:
The first four variables in the Makefile describe where your copy of the
Java SDK is loaded. If it's somewhere other than /usr/local/jdk
or you're compiling on something other than Linux, you'll need to change
the paths in this section.
On Linux, this should be as simple as typing make. On other systems, you may have to adjust some of the variables at the top of the Makefile first.
Again, on Linux this should just be a matter of becoming root and typing make install. On other systems you may need to alter the "INSTALL=" and "LDCONFIG=" lines manually in the Makefile.
If you want to install manually, you have to copy libxglk.so
and libjniglk.so
to somewhere where your dynamic linker will
find them, and jniglk
to somewhere on your path. If your system
requires you to run ldconfig after updating shared libraries then
do that too.
You may want to copy jniglk.jar to somewhere other than where you built
it. If you used make install, it was copied to the same place
as the .so files - by default, /usr/local/lib
.
If you're using a Bourne shell then add the following line to the end of your .profile / .bash_profile file:
CLASSPATH=$CLASSPATH:/usr/local/lib/jniglk.jar export CLASSPATH
If you're using a C shell then add this line to the end of your .cshrc / .tcshrc file
setenv CLASSPATH ${CLASSPATH}:/usr/local/lib/jniglk.jar
To test the installation, start a new shell and type jniglk. If the program runs successfully, you should get a window starting "JniGlk default screen".
Assuming that was OK, change to the directory in which the programs were built and type jniglk Model. If all goes according to plan, you should see the standard Glk model program. Three new commands have been added to it:
The Multiwin sample has also been converted to Java; to test that, type jniglk MultiWin.