Runtime Environment for Java 1.1.1 for OS/2

Java 1.1.1 for OS/2 is the port of Sun's Java version 1.1.1 programming environment to IBM's OS/2 Warp operating system. This file describes the use of the Runtime component of Java 1.1.1 for OS/2.


  • Installation
  • Java Interpreter
  • Applet Viewer
  • Configuration
  • Platform Specifics
  • Disabling the JIT Compiler
  • Information for DBCS environments
  • Where to find more information

  • Installation

    See the README file in the \JAVA11 directory for the latest information regarding installation. This file is also in the directory where you unpacked the Java 1.1.1 for OS/2 files.

    The installation of the Runtime component makes the following changes to the PATH and LIBPATH statements in CONFIG.SYS:

      PATH        includes x:\java11\bin;
      LIBPATH     includes x:\java11\dll;
    

    where x is the drive on which the Java Runtime component was installed.


    Java Interpreter

    The Java Interpreter, JAVA, executes Java byte codes. Java byte codes reside in a file with an extension of .class.

    To run the Java application hello.class:

            java  hello
    

    Note that the extension for the file should not be specified (it must be .class) and that the name is case sensitive.

    Java applications that use the Abstract Window Toolkit (AWT) can be started with the JAVA command. The JAVAPM command is provided for compatibility with prior versions of Java for OS/2 but is no longer needed.

    The .class file is created by the Java Compiler, JAVAC. The Java Compiler is shipped as part of the Java Toolkit component and is only necessary if you will be writing Java programs yourself.

    If you enter JAVA without any options, a list of available options is displayed.


    Applet Viewer

    The Java Applet Viewer, APPLET, provides a quick way to run Java applets. If the HTML file specified does not contain a Java applet, no function is performed.

    To run the applet contained in the file tictactoe.html:

           applet  tictactoe.html
    

    If you enter APPLET without any options, a list of available options is displayed in a popup window.


    Configuration

    A number of environment variables are available to modify the behavior of the Java Runtime component:

    SET JAVA_AUDIO_RATE=n
    Sets the preferred playback sample rate for audio. A value of 8 for n sets the playback rate to 8000 samples per second. Use a value of 11 for 11025 samples per second. The Java runtime normally tries a sample rate of 8000 first, which matches the incoming data stream rate, and then 11025.

    Some drivers, such as some ThinkPad 701C drivers dated prior to October 1995, appear to support a sample rate of 8000 but then fail; they can be made to work by setting a playback sample rate of 11025.

    SET JAVA_AUDIO_VOLUME=v
    Adjusts the volume level for the audio output. v is the percentage of the maximum volume, from 0 to 100. The default is 75.

    SET JAVA_COMPILER=<xyz>
    Specifies the name of the JIT (Just In Time) compiler to load. The default JIT is JAVAX.

    To disable the JIT, specify the name of a non-existent DLL. The "Unable to load DLL" warning message can be ignored; this is just an indication that you are running your Java application or applet without the JIT.

    SET JAVA_CONNECT_TIMEOUT=n
    Adjusts the amount of time to wait for a network connection before reporting a timeout. n is the time to wait in seconds, from 1 to 1000000. Default is 30.

    SET JAVA_CONSOLE=1
    Specifies that Java programs started by JAVA and APPLET are run with a Java console.

    SET JAVA_HOME=<dir>
    Specifies the path to the shared Java runtime directories.

    SET JAVA_NLS_SBCS=1
    Specifies that Java should run in single byte character set (SBCS) mode even in double byte character set (DBCS) environments.

    SET JAVA_NOPRINTDLG=1
    Specifies that Java should suppress the display of the printer properties dialog box before printing. This allows jobs to print without user intervention using the default printer properties.

    SET JAVA_USER=<dir>
    Specifies the path to the directory for user specific files such as the hotjava\property file.

    SET JAVA_WEBLOGS=<dir>
    Specifies the path to the directory where weblog files for each started Java process are written.

    Platform Specifics

    There are a number of platform specific changes for OS/2:

    General

    Applet Viewer

    Java Applications


    Disabling the JIT Compiler

    A Just In Time (JIT) compiler is provided with Java 1.1.1 for OS/2 which generates machine code for frequently used byte code sequences in a Java application or applet on-the-fly during execution. The JIT is enabled by default.

    You can disable the JIT to aid in the isolation of a problem with a Java application, an applet, or the compiler itself in a number of different ways:

    When you run your Java application or applet with the JIT disabled, you see an "Unable to load DLL" warning message with the name of the non-existent DLL you specified. You can ignore this message; it is just an indication that you are running your Java application or applet without the JIT.

    Information for DBCS environments


    Where to find more information

    To keep abreast of the current happenings with Java and IBM, visit the IBM Java Home Page or Sun's Web site at http://java.sun.com/.