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

# Documents

## Installation manual

### Installing on Macintosh

1. System Requirement

   - Macintosh with PowerPC G3, G4, G5 or Intel
   - Mac OS X 10.1 or higher
   - Java 2 Standard Edition 1.4 (included in Mac OS X)
   - Apple OpenGL (included in Mac OS X)
   - Apple QuickTime (included in Mac OS X)

   Because Jun for Java version 340 and later requires Java 2, it requires Mac OS X.

2. Installing Java 2 Standard Edition 1.4

   Java 2 Standard Edition 1.4 is included in Mac OS X.

   To develop with Jun for Java, you need to install Developer Tools.

3. Installing Apple OpenGL

   OpenGL is included in Mac OS X, too.

4. Installing Apple QuickTime

   To use the multimedia handling functions, you'll need to install QuickTime, which is also included in Mac OS X.

5. Installing "Jun for Java"

   The most recent version of Jun for Java is available for downloading from SRA's FTP server. Also the runtime version is available. It's free to renaming or moving files or so. But the runtime version has not source files.

   The downloadable files have been archived in ZIP format and restoring them will result the following files and folders. Please restore them in an appropriate folder.

   * You'll need StuffIt Expander or ZipIt to unzip it on Mac OS.

   > `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
   > `src-jni/QT/` | ... | Source directory of JNI shared library for Apple QuickTime
   > `lib/jun???.jar` | ... | Class library in JAR format. The ??? stands for the version number
   > `lib/macosx/libJunGL.jnilib` | ... | JNI-complient shared library file needed to access OpenGL from Jun for Java
   > `lib/macosx/libJunQT.jnilib` | ... | JNI-complient shared library file needed to access Apple QuickTime from Jun for Java

   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 shared library for StPL
   > `lib/StPL??.jar` | ... | StPL in JAR format. The ?? stands for the version number.
   > `lib/macosx/libStPL.jnilib` | ... | JNI-complient shared library 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.

   To rebuild libJunGL.jnilib, etc., execute `make` in `~/Jun4Java/src-jni/`. You need Developer Tools installed.

6. Invoking the Launcher

   Put the 2 JAR files ("`jun???.jar`" and "`StPL??.jar`"), JNI library file ("`jun4java.shlib`"), and JNI library file for QuickTime ("`JunQT.shlib`") to the same folder as "`jun4java.app`", and launch "`jun4java.app`."

   Or open the Terminal window, and set the `DYLD_LIBRARY_PATH` environment variable. Then, 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.

           setenv DYLD_LIBRARY_PATH $HOME/Jun4Java/lib/macosx
           java -cp $HOME/Jun4Java/lib/jun699.jar:$HOME/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 "`$HOME/Jun4Java`". If they have been installed elsewhere, then revise the specification of `CLASSPATH` appropriately.
7. Troubleshooting
   - The JunLauncher was not invoked and displayed the message "`Can't find JNI librarlly 'JunGL'.`"

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

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

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

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

   - Displayed the message "`Can't find JNI librally 'JunQT'.`" when you tried to open a movie window.

     > Could not find `libJunQT.jnilib`. Please copy `libJunQT.jnilib` to a directory specified with the `DYLD_LIBRARY_PATH` environment variable.

   - Displayed the message "`JNI library 'JunQT' version error.`" when you tried to open a movie window.

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

     > If more than one directories are specified with the `DYLD_LIBRARY_PATH` environment variable, be sure more than one `libJunQT.jnilib` files are not exist.

http://www.sra.co.jp/people/hoshi/
mailto:hoshi@sra.co.jp