last update: $Date: 2008/02/20 06:02:29 $

# Documents

## Installation manual

### Installing on Linux

1. System Environment

   - Linux (RedHad5.2 or later)
   - X Window System (16bit color or better)
   - Mesa3.1 or later
   - Java2 SDK 1.4.2 or higher
2. Installing SDK/JRE

   First, you will need to install Java2 Software Development Kit (SDK) , or Java2 Runtime Environment (JRE). SDK and JRE are both available at no cost from Blackdown.org or java.sun.com.

   Download JDK or JRE appropriate for your Linux.

   Some of the Linux distributions might have SDK ready beforehand. In that case, you don't have to re-install SDK.

3. Installing Mesa

   Download Mesa3.1 or higher.

   If you prefer to compile the library by yourself, download the source files and unpack it someplace appropriate (for example, under `~/mesa/`). To build the library, execute make linux-elf.

   Next, install the resulting library. The library, which was created under `~/mesa/lib/`, should be installed under the path which is specified in `LD_LIBRARY_PATH` environment variable (for example, under `/usr/lib`).

   Some of the Linux distributions might have Mesa ready beforehand. In that case, you don't have to re-install Mesa. If the pre-installed Mesa is older than version 3.1, please uninstall it and install Mesa3.1 or higher.

4. Installing "Jun for Java"

   The most recent version of Jun for Java is available for downloading from SRA's FTP server. The RPM are also available.

   The downloadable files have been archived in ZIP format and restoring them will result the following files and directories. Please restore them in an appropriate directory (for example, `~/Jun4Java/`). Please use '-a' option for unzip.

   > `README` | ... | README file.
   > `changes` | ... | Changes file.
   > `doc/Installation/` | ... | Directory which contains the installation manual.
   > `src/` | ... | Source directory
   > `src-jni/GL/` | ... | Source directory of JNI shared library for OpenGL
   > `lib/jun???.jar` | ... | Class library in JAR format. The ??? stands for the version number.
   > `lib/linux/libJunGL.so` | ... | JNI-compliant so file needed to access Mesa from Jun for Java. Compiled with Mesa 5.0.2

   Among these, `libJunGL.so` must be copied or moved to the path which is specified in `LD_LIBRARY_PATH` environment variable (for example, `/usr/lib`). If an old version of `libJunGL.so` is installed, please remove it to avoid an inappropriate reference.

   To rebuild `libJunGL.so`, execute `make` in `~/Jun4Java/src-jni/`. (Note that you will need to modify the variables `JDK_HOME` and `MESA_HOME` in the `Makefile` appropriate for your own environment)

   The downloaded file contains StPL.

   > `README-StPL` | ... | README file of StPL.
   > `src/sra/smalltalk` | ... | Source directory of StPL.
   > `src-jni/ST/` | ... | Source directory of JNI-compliant shared library for StPL.
   > `lib/StPL??.jar` | ... | StPL in JAR format. The ?? stands for the version number.
   > `lib/linux/libStPL.so` | ... | JNI-compliant so file needed to access StPL.

   As this library is a port of the original Jun written in Smalltalk (Jun for Smalltalk), Jun for Java uses SRA's "Smalltalk-Style Programming Library". Please read the README file at the StPL directory for more information.

5. Invoking the Launcher

   Add the 2 JAR files that have been installed (i.e., "`jun???.jar`" and "`StPL??.jar`") to the Java class path, then specify the class containing the method `main`, and invoke the Java virtual machine.

   For example, this can be accomplished by executing the following command.

           java -cp ~/Jun4Java/lib/jun699.jar:~/Jun4Java/lib/StPL89.jar jp.co.sra.jun.system.support.JunLauncher

   In this, it is assumed that the JAR files have been installed in the path "`~/Jun4Java`". If they have been installed elsewhere, then revise the specification of `CLASSPATH` appropriately.
6. Troubleshooting
   - The JunLauncher was not invoked and displayed the message "`Can't find JNI librarlly 'JunGL'.`"

     > Could not find `libJunGL.so`. Please copy `libJunGL.so` to a directory specified with the `LD_LIBRARY_PATH` environment variable.

   - The JunLauncher was not invoked and displayed the message "`JNI library 'JunGL' version error`".

     > Different version of `libJunGL.so` was found. Please copy `libJunGL.so` included in the distribution to a directory specified with the `LD_LIBRARY_PATH` environment variable and overwrite the old one.

     > If more than one directories are specified with the `LD_LIBRARY_PATH` environment variable, be sure more than one `libJunGL.so` files are not exist.

   - The JunLauncher was not invoked and no message is displayed.

     > The version of glibc might be different. Please compile and rebuild `libJunGL.so`.

   - Something wrong with 3D graphics.

     > You might be using an older version of Mesa. Please install Mesa3.1 or later.

     > If more than one directories are specified with the `LD_LIBRARY_PATH` environment variable, be sure more than one Mesa library are not installed.

http://www.sra.co.jp/people/r-matuda/
mailto:r-matuda@sra.co.jp