
                             JavaTM Advanced Imaging API

                            JavaTM Advanced Imaging API
                                                   v1.1
                                           Installation

  Contents

     * System Requirements
     * Downloading the archive files
     * Installation Instructions
          o Solaris operating environment installation instructions
          o CLASSPATH installation instructions for Solaris/Linux
          o Microsoft Windows operating environment installation instructions
          o Linux operating environment installation instructions
          o Sample Demo installation instructions
          o Automatic installation instructions
     * After Java Advanced Imaging is installed
     * Updating CLASSPATH, PATH, and LD_LIBRARY_PATH
     * Uninstall Instructions

  System Requirements:

     * For the SolarisTM operating environment:
          o Solaris operating environment 2.6 or subsequent compatible version.
          o JavaTM 2 platform, Standard Edition, v1.3.0 or later. (v1.3.0_01 or later for the JavaTM Plug-In.)
          o At least 14M bytes of free disk space for the SPARC edition, or at least 6M bytes of free disk
            space for the X86 platform.
          o Optionally, an additional 5M bytes of free disk space for the sample code and images
          o An additional 10M bytes may be needed temporarily during the installation process
     * For Microsoft Windows:
          o Windows ME, NT 4.0, 2000, 98 or 95.
          o JavaTM 2 platform, Standard Edition, v1.3.0 or later. (v1.3.0_01 or later for the JavaTM Plug-In.)
          o At least 7M bytes of free disk space
          o Optionally, an additional 5M bytes of free disk space for the sample code and images
          o An additional 10M bytes may be needed temporarily during the installation process

  Downloading the Archive Files

  Using your browser, download the appropriate executable(s) or tar.gz files from the download page to the
  location where you want to temporarily store them.

  The download has been broken into two archives for convenience. The first archive contains the JAI library
  itself and is required in order to run JAI. The second archive contains sample code and images that may
  optionally be downloaded in order to demonstrate some of the functionality of JAI.

  Installation Instructions

     * Solaris operating environment installation instructions

       For the SPARC edition, the download files are:
          o jai-1_1-lib-solsparc-jdk.bin
          o jai-1_1-lib-solsparc-jre.bin
          o jai-1_1-lib-solsparc.tar.gz

       For the Intel edition, they are:
          o jai-1_1-lib-solx86-jdk.bin
          o jai-1_1-lib-solx86-jre.bin
          o jai-1_1-lib-solx86.tar.gz

       Assuming:

            $JDK1_3       is the path into the jdk1.3 (or a higher version),
            $downloaddir  is the directory into which you
            downloaded the .bin files.

       To install the JDK version for Solaris:

          o If you are on a SPARC-based system, run the commands:

            % cd $JDK1_3
            % chmod u+x $downloaddir/jai-1_1-lib-solsparc-jdk.bin
            % $downloaddir/jai-1_1-lib-solparc-jdk.bin

          o If you are on an Intel-based system, run the commands:

            % cd $JDK1_3
            % chmod u+x $downloaddir/jai-1_1-lib-solx86-jdk.bin
            % $downloaddir/jai-1_1-lib-solx86-jdk.bin

       You may answer 'yes' to any questions about replacing files. You may delete the jai-1_1-*.bin files
       after you are done with the extraction.

       IMPORTANT: If you do not "cd" to the JDK1.3 (or higher version) directory before performing the
       extraction, then JAI will not work correctly. You may also need appropriate write permissions into the
       JDK directory in order to install.

       To install the JRE version for Solaris:

             % cd $JRE1_3         ($JRE1_3 is the path into jre1.3 or later version.)

          o If you are on a SPARC-based system, run the commands:

            % chmod u+x $downloaddir/jai-1_1-lib-solsparc-jre.bin
            % $downloaddir/jai-1_1-lib-solparc-jre.bin

          o If you are on an Intel-based system, run the commands:

            % chmod u+x $downloaddir/jai-1_1-lib-solx86-jre.bin
            % $downloaddir/jai-1_1-lib-solx86-jre.bin

       To view an html page containing an applet (using JAI or other optional packages) with Netscape 4.x, you
       need to set NPX_PLUGIN_PATH with

            % setenv NPX_PLUGIN_PATH $JRE1_3/plugin/sparc/ns4

       if you have not already done so, when you installed your Solaris JRE/plugin.

       IMPORTANT: If you do not "cd" to the JRE1.3 (or higher version) directory before performing the
       extraction, then JAI will not work correctly. You may also need appropriate write permissions into the
       JRE directory in order to install.

     * CLASSPATH installation instructions for Solaris/Linux platforms

       The tar.gz downloads are installations which do not check for the JDK or the JRE and install into a
       directory called jai-1_1 by default. CLASSPATH needs to be set to point to the jar files in this
       directory.

       Assuming:

            $PLATFORM   is the specific platform (solsparc/solx86/linux)
            $JAIDIR     is the directory into which the JAI files are to be installed

       To install, change directories to $JAIDIR, unzip, untar, and set CLASSPATH as follows:

            % cd $JAIDIR
            % gunzip -c $downloaddir/jai-1_1-lib-($PLATFORM).tar.gz | tar xf -

       Set CLASSPATH as follows:

            % setenv JAIHOME $JAIDIR/jai-1_1/lib
            % setenv CLASSPATH $JAIHOME/jai_core.jar:$JAIHOME/jai_codec.jar:$JAIHOME/mlibwrapper.jar:$CLASSPATH
            % setenv LD_LIBRARY_PATH .:$JAIHOME:$CLASSPATH

     * Microsoft Windows installation instructions

       The downloaded objects are executable files. In Microsoft Windows, they are .exe files:
          o jai-1_1-lib-win.exe
          o jai-1_1-lib-win-jre.exe
          o jai-1_1-lib-win-jdk.exe

       To install the library files, double-click on the jai-1_1-lib-win.exe icon and follow the directions.
       This will install the library files into a default location C:\jai-1_1 without any check for the JDK or
       the JRE

       To install the JRE version, double-click on the jai-1_1-lib-win-jre.exe icon and follow the directions.

       To install the JDK version, double-click on the jai-1_1-lib-win-jdk.exe icon and follow the directions.

       You may delete the jai-1_1-*.exe files after you are done with the extraction.

       IMPORTANT: The executable will try to install JAI within the latest JDK version that it finds. If you
       need to install and use JAI within another JDK version on disk, please make sure you enter a valid JDK
       directory when prompted.

     * Linux installation instructions

       The downloaded files are:
          o jai-1_1-lib-linux-jdk.bin
          o jai-1_1-lib-linux-jre.bin
          o jai-1_1-lib-linux.tar.gz

       To install the JDK version for Linux, assuming:

            $JDK1_3       is the path into the jdk1.3 (or a higher version),
            $downloaddir  is the directory into which you downloaded the .bin files.

       Run the following commands:

            % cd $JDK1_3
            % chmod u+x $downloaddir/jai-1_1-lib-linux-jdk.bin
            % $downloaddir/jai-1_1-lib-linux-jdk.bin

       IMPORTANT: If you do not "cd" to the JDK1.3 (or higher version) directory before performing the
       extraction, then JAI will not work correctly. You may also need appropriate write permissions into the
       JDK directory in order to install.

       To install the JRE version for Linux, try

             % cd $JRE1_3         ($JRE1_3 is the path into jre1.3 or later version.)
             % chmod u+x $downloaddir/jai-1_1-lib-linux-jre.bin
             % $downloaddir/jai-1_1-lib-linux-jre.bin

       IMPORTANT: If you do not "cd" to the JRE1.3 (or higher version) directory before performing the
       extraction, then JAI will not work correctly. You may also need appropriate write permissions into the
       JRE directory in order to install.

     * Sample Demo installation instructions

       The downloaded files are:
          o jai-1_1-unix-sample.tar.gz
          o jai-1_1-win-sample.exe

       If you wish to install the sample files on Solaris/Linux, run the command:

       % gunzip -c $downloaddir/jai-1_1-unix-sample.tar.gz | tar xf -

       On Windows: double-click on the jai-1_1-win-sample.exe icon and follow the directions.

     * Automatic Installation of JAI

       Sun has introduced a new feature into the Java Plug-In (JPI) starting with version 1.3. The JPI
       installs/replaces the Java extensions in your browser with an updated version. The JPI is installed
       automatically when Java from Sun is installed on Windows, and starting with Java 1.3, on Solaris too. If
       a user's browser runs a Java program requiring an Optional Package, the Plug-In can be made to
       automatically download and run the Optional Package's installer. For more information refer
       to:http://java.sun.com/products/plugin/1.3/docs/extensions.html

       Thus, it is possible that your browser may attempt to install the latest JAI version into the java
       standard optional package directory $JRE1_3/lib/ext, when you view an HTML page with an
       auto-installation enabled JAI applet. In case of problems, check whether a desired version of jre/plugin
       is used. For example, it requires JRE 1.3.0 or later on Windows and JRE 1.3.1 or later on Solaris. See
       also (Updating CLASSPATH, PATH, and LD_LIBRARY_PATH) for usage of the correct version of JRE/plugin.

       The feature-enabled plugin downloads a signed jar which contains the special Manifest file and the
       appropriate installer according to platform. The jar file for Windows is now available for developers to
       download, test and use.

       However, there are a couple of known issues with the plugin.

       On Windows: A bug in the 1.3 version of the JPI keeps signatures from being verified. The user still
       sees a dialog where they "Grant" permission, but the certificate is never actually verified. Your
       installer will be downloaded and run without its authenticity being checked. JPI 1.3.1 fixes the
       problem. When you use JPI 1.3.1, you will notice that you get more information about the signing
       certificate.

       On Solaris: The Solaris Auto Installation jar requires the JPI v1.3.1, which is still in beta for
       Solaris. We hope that it is released soon, so that developers may use this feature for their JAI
       deployment.

  After Java Advanced Imaging is installed

  Java Advanced Imaging will be installed under the $JDK1_3 directory with the following files:
  COPYRIGHT-jai.txt                Copyright notice.
  INSTALL-jai.txt                  Installation instructions (this file)
  UNINSTALL-jai                    UnInstall executable
  LICENSE-jai.txt                  License agreement.
  README-jai.txt                   Useful release information.
  jre/lib/ext/jai_core.jar         JAR file containing core JAI class files.
  jre/lib/ext/jai_codec.jar        JAR file containing JAI class files for image I/O.
  jre/lib/ext/mlibwrapper_jai.jar  mediaLib JNI interfaces.
  jre/lib/sparc/libmlib_jai.so     mediaLib JNI shared libraries, C version.
                                   (Solaris operating environment, SPARC edition.)
  jre/lib/sparc/libmlib_jai_vis.so mediaLib JNI shared libraries, VIS version.
                                   (Solaris operating environment, SPARC edition only.)
  jre/lib/i386/libmlib_jai.so      mediaLib JNI shared libraries, C version.
                                   (Solaris operating environment, Intel edition.)
  jre/bin/mlib_jai.dll             mediaLib JNI DLL libraries, C version.
                                   (Microsoft Windows operating environment)
  jre/bin/mlib_jai_mmx.dll         mediaLib JNI DLL libraries, MMX version.
                                   (Microsoft Windows operating environment)
  jre/bin/checkmmx.exe             A utility to detect whether MMX is available or not.
                                   (Microsoft Windows operating environment)

  If the sample archive has been installed, the following files will also be installed:
  demo/jai/Makefile         Makefile to build the sample programs.
  demo/jai/README           Information about the sample programs.
  demo/jai/runjai*.sh       Solaris operating environment -
                            Shell scripts to run the sample programs.
  demo/jai/runjai*.bat      Microsoft Windows -
                            Batch files to run the sample programs.
  demo/jai/*.java           Sample source code.
  demo/jai/*.class          Sample class files.
  demo/jai/codec/Makefile   Makefile to build the codec sample program.
  demo/jai/codec/runjai.sh  Solaris operating environment -
                            Shell script to run the codec sample program.
  demo/jai/codec/runjai.bat Microsoft Windows -
                            Batch file to run the codec sample program.
  demo/jai/codec/*.java     Codec sample source code.
  demo/jai/codec/*.class    Codec sample class files.
  demo/jai/images/*.bmp     Sample BMP images.
  demo/jai/images/*.gif     Sample GIF images.
  demo/jai/images/*.fpx     Sample FlashPIX images.
  demo/jai/images/*.jpg     Sample JPEG images.
  demo/jai/images/*.png     Sample PNG images.
  demo/jai/images/*.pgm     Sample PGM images.
  demo/jai/images/*.ppm     Sample PPM images.
  demo/jai/images/*.tif     Sample TIFF images.

  Read the top-level README-jai.txt file for information on what is in this release of Java Advanced Imaging.

  Updating CLASSPATH, PATH, and LD_LIBRARY_PATH

  If JAI is installed as part of the Java 2 SDK's Java Runtime Environment, no CLASSPATH or LD_LIBRARY_PATH
  settings are required. When you encounter problems running JAI applications, it is most likely that you are
  not running the correct version of java (jdk). Check with the command "java -version" on Solaris or at Dos
  prompt. If needed, set the PATH correctly to use the correct version of JDK or JRE as follows.

  For Solaris:

  % setenv PATH $JDK1_3/bin:$PATH;    or
  % setenv PATH $JRE1_3/bin:$PATH;    and/or
  % setenv NPX_PLUGIN_PATH $JRE1_3/plugin/sparc/ns4;   (for applet/plugin to work on Netscape 4.x);

  Note: The plugin used should be v1.3.0_01 or higher

  For Windows:

  A point to be noted on the Windows platform is that the Java2 SDK 1.3, by default, installs Java into both
  the JDK location:

  c:\jdk1.3

  and into the JRE location:

  C:\Program Files\JavaSoft\jre\1.3

  Additionally, a shortcut to java.exe is installed in the WINNT/System32 (for NT systems) or Windows/System
  (for Windows 95 and 98) directory.

  Developers need to be aware of this when working with the Java 2 SDK. Unless the path to the 1.3 SDK jre\bin
  and bin directories is placed in the PATH environment variable in the same order, ahead of the system
  directory, the SDK's java.exe will not be executed. Any extensions (such as JAI) that are installed into the
  SDK but not into the JRE will not be found during program execution. The same applies to higher versions of
  the JDK.

  To set PATH environment variable, you may need to edit autoexec.bat on Windows 98/95. For other Windows
  systems, try click Start-Settings-ControlPanel, then double click on System. Choose Environment. Under System
  Variables, click on Path, and update its value to put

         c:\Program Files\JavaSoft\jre\1.3\bin;     or
         c:\jdk1.3\jre\bin;     or
         c:\jdk1.3\bin;

  ahead of others. Note that ";" is used to separate from other values. To double check, open a DOS command
  prompt and use "set" or "set path" to view the PATH environment variable.

  If you have used the CLASSPATH install into arbitrary location for Windows, then you will also need to set
  your CLASSPATH variable to point to each of the jai jar files in your installed directory

  Uninstall Instructions

     * Solaris/Linux operating environment

            % cd $JDK1_3

            where $JDK1_3 is the path into the jdk1.3 (or a higher version) directory, where JAI was installed.

            % chmod u+x UNINSTALL-jai
            % ./UNINSTALL-jai

     * Microsoft Windows Operating environment
            You would need to go to the Control Panel and double-click on Add/Remove Programs. Find the listing
            for Java Advanced Imaging 1.1 and click on Add/Remove. This should uninstall the library for you.
