IBM 31-bit Runtime Environment for Linux on zSeries, Java 2 Technology Edition, Version 1.4.1; User Guide - IBM 31-bit Runtime Environment for Linux on zSeries, Java 2 Technology Edition, Version 1.4.1
Date: 2003-09-10

# IBM 31-bit Runtime Environment for Linux on zSeries, Java 2 Technology Edition, Version 1.4.1

# User Guide

# Copyright information

Note: Before using this information and the product it supports, be sure to read the general information under Notices.

This edition of the User Guide applies to the IBM 31-bit Runtime Environment for Linux on zSeries, Java 2 Technology Edition, Version 1.4.1, Service Refresh 1, and to all subsequent releases and modifications until otherwise indicated in new editions.

(c) Copyright Sun Microsystems, Inc. 1997, 2002, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.

(c) Copyright International Business Machines Corporation, 1999, 2003. All rights reserved.

U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

# Preface

The IBM(R) 31-bit Runtime Environment for Linux on zSeries(R), Java(TM) 2 Technology Edition, Version 1.4.1 contains the Java Virtual Machine (JVM), core Sun Microsystems Java classes, and supporting files. The Runtime Environment does not contain all the classes that are found in the SDK package.

The User Guide provides general information about the Runtime Environment and specific information about any differences in the IBM implementation of the Runtime Environment compared with the Sun implementation. Read this User Guide in conjunction with the more extensive documentation on the Sun Web site: http://java.sun.com.

For the list of distributions against which the SDK for Linux has been tested, see: http://www-106.ibm.com/developerworks/java/jdk/linux/tested.html

Note that the Runtime Environment for Linux is a subset of the SDK and enables you only to run Java applications. If you have installed the SDK, the Runtime Environment is included.

The terms "Runtime Environment" and "Java Virtual Machine" are used interchangeably throughout this User Guide.

Technical changes for this User Guide are indicated in red.

# Contents

Copyright information
Preface
Overview
Version compatibility
Files included with the Runtime Environment for Linux
License agreement
The just-in-time (JIT) compiler
The Native Method Interface and the Java Native Interface
Configuring the Runtime Environment for Linux
Uninstalling the Runtime Environment for Linux
Uninstalling the installable Red Hat Package Manager (RPM) package
Uninstalling the compressed Tape Archive (TAR) package
Launching a Java application
Summary of commands
Options
Standard options
Non-standard options
Globalization of the java command
Working with classpaths
How the JVM processes signals
Signals used by the JVM
Linking a native code driver to the signal-chaining library
Working with the bootclasspath
Specifying garbage collection policy
Pause time
Pause time reduction
Environments with very full heaps
Further information about garbage collection
Obtaining the IBM build and version number
Working with floating stacks
Switching the input method in DBCS languages
Runtime example
Installing your application on a user's system
Known limitations
Notices
Trademarks

# Overview

The Runtime Environment for Linux contains the subset of classes that are required to create a Java runtime environment and to run Java programs. It also contains the Java Virtual Machine, Java classes, and supporting files. The Runtime Environment for Linux contains only a subset of the classes that are found in the SDK.

## Version compatibility

In general, any applet or application that runs in Version 1.1.8, 1.2.2 or 1.3.1 of the SDK for Linux should run correctly in this version. Applets that depend on Sun's Java 1.4.1 APIs work only on browsers that support Java 1.4.1 APIs.

There is no guarantee that 1.4.1-compiled classes work on pre-1.4.0 Runtime Environment releases.

## Files included with the Runtime Environment for Linux

The Runtime Environment for Linux includes non-debuggable .so files and class files that are needed to support a program at runtime. The Runtime Environment for Linux does not include any of the development tools, such as appletviewer or javac, or classes that would pertain only to a development system.

## License agreement

The LICENSE_xx.html file contains the license agreement for the Runtime Environment for Linux software. (xx is an abbreviation for the language.)

To view or print the license agreement, open the file in a Web browser.

## The just-in-time (JIT) compiler

The just-in-time (JIT) compiler (libjitc.so) dynamically generates machine code for frequently-used bytecode sequences in Java applications and applets while they are running.

The Runtime Environment for Linux includes the JIT (libjitc.so), which is enabled by default. You can disable the JIT to help isolate a problem with a Java application, an applet, or the compiler itself.

To disable the JIT, at a shell prompt in the window where you will run the application, type:

        export JAVA_COMPILER=NONE

To enable the JIT, type at a shell prompt:

        export JAVA_COMPILER=jitc

To verify whether or not the JIT is enabled, type at a shell prompt:

        java -version

If the JIT is in use, a message is displayed that includes:

    (JIT enabled: jitc)

If the JIT is not in use, a message is displayed that includes:

    (JIT disabled)

## The Native Method Interface and the Java Native Interface

IBM does not support the Native Method Interface in this release. Do not use this interface in your applications.

The Java Native Interface (JNI) is included with the Runtime Environment. For information about using the JNI, see the Sun Web site: http://java.sun.com.

# Configuring the Runtime Environment for Linux

After you install the Runtime Environment for Linux, edit your shell login script and add this directory to your PATH statement:

/opt/IBMJava2-s390-141/jre/bin

If you installed the Runtime Environment for Linux in a directory other than /opt/IBMJava2-s390-141/, replace /opt/IBMJava2-s390-141/ with the directory in which you installed the Runtime Environment for Linux.

# Uninstalling the Runtime Environment for Linux

The process that you use to remove the Runtime Environment for Linux depends on whether you installed the installable Red Hat Package Manager (RPM) package or the compressed Tape Archive (TAR) package. See Uninstalling the installable Red Hat Package Manager (RPM) package or Uninstalling the compressed Tape Archive (TAR) package for instructions.

## Uninstalling the installable Red Hat Package Manager (RPM) package

To uninstall the Runtime Environment for Linux if you installed the installable RPM package:

1. At a shell script, type:

           rpm -e IBMJava2-JRE-1.4.1

   Alternatively, you can use a graphical tool such as kpackage or yast2

2. Remove from your PATH statement the directory in which you installed the Runtime Environment .

## Uninstalling the compressed Tape Archive (TAR) package

To uninstall the Runtime Environment for Linux if you installed the compressed TAR package:

1. Remove the Runtime Environment files from the directory in which you installed the Runtime Environment.
2. Remove from your PATH statement the directory in which you installed the Runtime Environment.

# Launching a Java application

The java tool launches a Java application.

The JVM searches for the startup class, and other classes that are used, in three sets of locations: the bootstrap classpath, the installed extensions, and the user classpath. Arguments after the class name or JAR file name are passed to the main function.

The javaw command is identical to java, except that javaw has no associated console window. Use javaw when you do not want a command prompt window to appear. The javaw launcher displays a dialog box with error information if a launch fails.

## Summary of commands

The java and javaw command have the following syntax:

    java [ options ] class [ arguments ... ]
    java [ options ] -jar file.jar [ arguments ... ]
    javaw [ options ] class [ arguments ... ]
    javaw [ options ] -jar file.jar [ arguments ... ]

Items that are within brackets are optional.

options
  Command-line options.
class
  Name of the class to invoke.
file.jar
  Name of the jar file to invoke. It is used only with -jar.
argument
  Argument passed to the main function.

If the -jar option is specified, the named JAR file contains class and resource files for the application, with the startup class indicated by the Main-Class manifest header.

## Options

The launcher has a set of standard options that are supported on the current runtime environment and will be supported in future releases. In addition, there is a set of non-standard options.

### Standard options

- -D<property_name>=<value>
  - Sets a system property.
- -assert
  - Prints help on assert-related options.
- -cp or -classpath <directories and zip or jar files separated by :>
  - Set search path for application classes and resources. If -classpath and -cp are not used, and CLASSPATH is not set, the user classpath is, by default, the current directory (.). Also see Working with classpaths.
- -help or -?
  - Prints a usage message.
- -showversion
  - Prints product version and continues.
- -verbose:[class | gc | jni]
  - Enables verbose output.
- -version
  - Prints product version.
- -X
  - Prints help on non-standard options.

### Non-standard options

The -X options listed below are a subset of the available ones. They are nonstandard and subject to change without notice.

- -Xargencoding
  - Allows the options on the java command to use Unicode escape sequences to represent characters that are not in the character set of the locale. Unicode escape sequences are of the form \u#### where # is a hexadecimal digit.
- -Xbootclasspath:<directories and zip or jar files separated by ;>
  - Sets search path for bootstrap classes and resources. There are other ways of setting the bootclasspath. See Working with the bootclasspath. Do not deploy applications that use this option to override a class in core.jar, graphics.jar, server.jar, security.jar, xml.jar, tools.jar, or charsets.jar, because such a deployment would contravene the Java 2 Runtime Environment binary code license.
    Note:
    The rt.jar of earlier releases has been split up into various jar files in Version 1.4.1: core.jar, graphics.jar, security.jar, server.jar, and xml.jar.
- -Xbootclasspath/a:<directories and zip or jar files separated by ;>
  - Appends to end of bootstrap class path.
- -Xbootclasspath/p:<directories and zip or jar files separated by ;>
  - Puts on the front of bootstrap class path. Do not deploy applications that use this option to override a class in core.jar, graphics.jar, server.jar, security.jar, xml.jar, tools.jar, or charsets.jar, because such a deployment would contravene the Java 2 Runtime Environment binary code license.
- -Xcheck:jni
  - Performs additional checks for JNI functions.
- -Xcheck:nabounds
  - Performs additional checks for JNI array operations.
- -Xdebug
  - Starts the JVM with the debugger enabled.
- -Xdisableexplicitgc
  - Changes calls to System.gc() into no-ops.
- -Xdisablejavadump
  - Disables the java dump facility for abnormal process termination. When the java dump is disabled, the system process termination dump is run. The java dump is useful when the problem occurs within the java code. If the problem is in system components, it might be more useful to get the normal system dump.
- -Xgcpolicy:{optthruput | optavgpause }
  - Specifies the garbage collection setting. The default setting is optthruput. For more information, see Specifying garbage collection policy.
- -Xms<size>
  - Sets initial Java heap size.
- -Xmx<size>
  - Sets maximum Java heap size.
- -Xnoclassgc
  - Disables class garbage collection.
- -Xoss<size>
  - Sets maximum Java stack size for any thread.
- -Xquickstart
  - Improves the startup time of applications . If you do not specify this option, the initial compilation of methods is done at high optmization (that is, the JIT does not recompile "hot" methods because the methods are initially compiled with high optimization).
- -Xrs
  - Reduces the use of operating system signals.
- -Xrunlibrary_name[:options]
  - Loads helper libraries. To load multiple libraries, specify it more than once on the command line. Examples of these libraries are:
    - -Xrunhprof[:help] | [:<option>=<value>, ...]
      - Performs heap, CPU, or monitor profiling.
    - -Xrunjdwp[:help] | [:<option>=<value>, ...]
      - Loads debugging libraries to support the remote debugging of applications.
- -Xss<size>
  - Sets maximum native stack size for any thread. For more information, see Working with floating stacks.
- -Xverbosegclog:<path to file><filename>[X, Y]
  - Causes verboseGC output to be written to the specified file. If the file exists, it is overwritten. Otherwise, if an existing file cannot be opened or a new file cannot be created, the output is redirected to stderr. If you specify the arguments X and Y (both are integers) the verboseGC output is redirected to Y number of files, each containing X number of gc cycles worth of verboseGC output. These files have the form filename1, filename2, and so on.
    Note:
    The environment variable IBM_JVM_ST_VERBOSEGC_LOG has been removed from this release.
- -Xverify
  - Enables strictest checks, anticipating future default.

## Globalization of the java command

The java command and other java launcher commands (such as javaw) allow a class name to be specified as any Unicode character that is in the character set of the current locale.

You can specify any Unicode character in the class name and arguments by using java escape sequences. To do this, you must specify -Xargencoding. To specify a Unicode character, use escape sequences in the form `\u####`, where # is a hexadecimal digit (0 through 9, A through F).

To specify that the class name and command arguments are in UTF8 or ISO8859_1 encoding, use -Xargencoding:utf8 and -Xargencoding:latin.

In the Runtime Environment, if you are using a non-English locale, the java and javaw commands give translated output messages. These messages are different from those that are in the 1.3.1 version and also differ based on the locale in which Java is running. The detailed error descriptions and other debug information that is returned by java is in English. Debug information that is returned during initialization is shown in brackets.

## Working with classpaths

In the Runtime Environment, you can specify a class name as a complete file name including a full path and the .class extension. In previous versions of the SDK, you could specify only the class that was relative to the CLASSPATH, and the .class extension was not allowed. Use of the complete file name permits you to launch a java application from your desktop or file launcher. If you specify a .class file with path and extension, the specified path is put into the CLASSPATH. For example, the command `java ~/myapp/thisapp.class` is equivalent to specifying `java -classpath ~/myapp thisapp`.

## How the JVM processes signals

When a signal is raised that is of interest to the JVM, a signal handler is called. This signal handler determines whether it has been called for a Java or non-Java thread. If the signal is for a Java thread, the JVM takes control of the signal handling. If the signal is for a non-Java thread, and the application that installed the JVM had previously installed its own handler for the signal, control is given to that handler. Otherwise, the signal is ignored (whether or not this is not the signal's default action).

For exception and error signals the JVM either:

- Handles the condition and recovers (when the exception is caused by your application code), or
- Enters a controlled shutdown sequence where it:
  1. Calls your application's signal handler for that signal
  2. Outputs a Javadump, to describe the JVM state at the point of failure
  3. Calls any application-installed abort hook
  4. Performs the necessary cleanup to give a clean shutdown

For information about how to write a launcher that specifies the above hooks, see: http://www-106.ibm.com/developerworks/java/library/i-signalhandling/ (this was written for Java v1.3.1, but applies also to later versions).

For interrupt signals, the JVM also enters a controlled shutdown sequence, but this time it is treated as a normal termination that:

- Calls your application's signal handler for that signal
- Runs all application shutdown hooks
- Calls any application-installed exit hook
- Performs the necessary JVM cleanup

The shutdown is identical to the shutdown initiated by a call to the Java method `System.exit()`.

Other signals that are used by the JVM are for internal control purposes and do not cause it to terminate. The only control signal of interest is SIGQUIT, which causes a Javadump to be generated.

### Signals used by the JVM

Table 1 below shows the signals that are used by the JVM. The signals have been grouped in the table by type or use, as follows:

- Exceptions: The operating system synchronously raises an appropriate exception signal whenever a fatal condition occurs.
- Errors: The JVM raises a SIGABRT if it detects a condition from which it cannot recover.
- Interrupts: Interrupt signals are raised asynchronously, from outside a JVM process, to request shutdown.
- Controls: Other signals that are used by the JVM for control purposes.

Table 1. Signals used by the JVM
Signal Name | Signal type | Description | Disabled by -Xrs
--- | --- | --- | ---
SIGSEGV | Exception | Incorrect access to memory (write to inaccessible memory) | No
SIGILL | Exception | Illegal instruction (attempt to invoke an unknown machine instruction) | No
SIGFPE | Exception | Floating point exception (divide by zero) | No
SIGBUS | Exception | Bus error (attempt to address nonexistent memory location) | Yes
SIGSYS | Exception | Bad system call issued | Yes
SIGXCPU | Exception | CPU time limit exceeded (you have been running too long) | Yes
SIGXFSZ | Exception | File size limit exceeded | Yes
SIGABRT | Error | Abnormal termination. The JVM raises this signal whenever it detects a JVM fault. | Yes
SIGINT | Interrupt | Interactive attention (CTRL-C). JVM exits normally. | Yes
SIGTERM | Interrupt | Termination request. JVM will exit normally. | Yes
SIGHUP | Interrupt | Hang up. JVM exits normally. | Yes
SIGUSR1 | Control | User defined. Used by some JVMs for internal control purposes. | No
SIGUSR2 | Control | User defined. Used by some JVMs for internal control purposes. | No
SIGQUIT | Control | A quit signal for a terminal. JVM uses this for taking Javadumps. | Yes
SIGTRAP | Control | Internal for use by dbx or ptrace. Used by some JVMs for internal control purposes. | Yes
SIGPIPE | Control | A write to a pipe that is not being read. JVM ignores this. | No

Use the -Xrs (reduce signal usage) option to prevent the JVM from handling most signals. For more information, see Sun's Java application launcher page at http://java.sun.com/j2se/1.4.1/docs/tooldocs/windows/java.html.

Signals `1 (SIGHUP)`, `2 (SIGINT)`, `4 (SIGILL)`, `6 (SIGABRT)`, `7 (SIGEMT)`, `8 (SIGFPE)`, `10 (SIGBUS)`, `11 (SIGSEGV)`, `12 (SIGSYS)`, `15 (SIGTERM)`, and `24 (SIGXCPU)` cause the JVM to shut down; therefore, an application signal handler should not attempt to recover from these unless it no longer requires the services of the JVM.

### Linking a native code driver to the signal-chaining library

The IBM 31-bit Runtime Environment for Linux on zSeries, Java 2 Technology Edition, Version 1.4.1 JVM contains a new signal-chaining facility. Signal-chaining enables the JVM to interoperate more efficiently with native code that installs its own signal handlers.

The signal-chaining facility enables an application to link and load the shared library libjsig.so before the system libraries. The libjsig.so library ensures that calls such as `signal()`, `sigset()`, and `sigaction()` are intercepted so that their handlers do not replace the JVM's signal handlers. Instead, these calls save the new signal handlers, or "chain" them behind the handlers that are installed by the JVM. Later, when any of these signals are raised and found not to be targeted at the JVM, the preinstalled handlers are invoked.

To use libjsig.so:

- Link it with the application that creates or embeds a JVM:

      gcc -L$JAVA_HOME/bin -ljsig -L$JAVA_HOME/bin/classic -ljvm java_application.c

  or
- Use the LD_PRELOAD environment variable:

      export LD_PRELOAD=$JAVA_HOME/bin/libjsig.so; java_application (bash and ksh)

      setenv LD_PRELOAD=$JAVA_HOME/bin/libjsig.so; java_application (csh)

  (Assuming that `JAVA_HOME` is set up; otherwise, use /opt/IBMJava2-s390-141/jre.)

If you install signal handlers that use `sigaction()`, some sa_flags are not observed when the JVM uses the signal. These are:

- SA_NOCLDSTOP - This is always unset.
- SA_NOCLDWAIT - This is always unset.
- SA_RESTART - This is always set.
- SA_ONSTACK - This is always set (SIGSEGV only).

The libjsig.so library also hides JVM signal handlers from the application. Therefore, calls such as `signal()`, `sigset()`, and `sigaction()` that are made after the JVM has started no longer return a reference to the JVM's signal handler, but instead return any handler that was installed before JVM startup.

## Working with the bootclasspath

You can set the system property ibm.jvm.bootclasspath by using the -D option that is described in Launching a Java application. The value of this property is used as an additional search path, which is inserted between any value that is defined by -Xbootclasspath/p: and the bootstrap classpath. The bootstrap classpath is either the default, or that that is defined using the -Xbootclasspath: option.

## Specifying garbage collection policy

The -Xgcpolicy JVM runtime option specifies garbage collection policy.

-Xgcpolicy takes the values optthruput (the default) or optavgpause. The option controls garbage collector behavior, making tradeoffs between throughput of the application and overall system and the pause times that are caused by garbage collection.

The format of the option and its values is:

> -Xgcpolicy:optthruput

> -Xgcpolicy:optavgpause

### Pause time

When an application's attempt to create an object cannot be satisfied immediately from the available space in the heap, the garbage collector is responsible for identifying unreferenced objects (garbage), deleting them, and returning the heap to a state in which the immediate and subsequent allocation requests can be satisfied quickly. Such garbage collection cycles introduce occasional unexpected pauses in the execution of application code. Because applications grow in size and complexity, and heaps become correspondingly larger, this garbage collection pause time tends to grow in size and significance. The default garbage collection value, optthruput, delivers very high throughput to applications, but at the cost of these occasional pauses, which can vary from a few milliseconds to many seconds, depending on the size of the heap and the quantity of garbage.

### Pause time reduction

The optavgpause option substantially reduces the time that is spent in these garbage collection pauses, in addition to limiting the effect of increasing heap size on the length of the garbage collection pause. This option is particularly relevant to configurations that have large heaps. The pause times are reduced by performing some garbage collection activities that are concurrent with normal program execution. With the reduced pause time, you might experience some reduction of application throughput, which varies from application to application.

### Environments with very full heaps

If the Java heap becomes nearly full, and very little garbage is to be reclaimed, requests for new objects might not be satisfied quickly because no space is immediately available. If the heap is operated at near-full capacity, application performance might suffer regardless of which of the above options is used; and, if requests for more heap space continue to be made, the application receives an OutofMemory exception, which results in JVM termination if the exception is not caught and handled. At this point the JVM will produce two diagnostic files: a Heapdump and a Javadump. These are detailed in the Diagnostics Guide for Java 1.4.1 and can be used to determine what caused the high occupancy of the Java heap. In these conditions, you are recommended either to increase the heap size by using the -Xmx option, or to reduce the number of application objects in use.

### Further information about garbage collection

For more detailed information about garbage collection, see:

http://www.ibm.com/developerworks/ibm/library/i-garbage1/

http://www.ibm.com/developerworks/ibm/library/i-garbage2/

http://www.ibm.com/developerworks/ibm/library/i-garbage3/

For information about handling memory leaks in your Java application, see: http://www.ibm.com/developerworks/library/j-leaks/index.html.

For information about tuning the heap size see:http://www-106.ibm.com/developerworks/library/j-tip-heap-size.html.

# Obtaining the IBM build and version number

To obtain the IBM build and version number, at a shell prompt type:

`java -version`

# Working with floating stacks

On a nonfloating stack Linux system, regardless of what is set for -Xss, a minimum native stack size of 256 KB for each thread is provided. On a floating stack Linux system, the -Xss values are honored. Therefore, if you are migrating from a non-floating stack Linux system, you must ensure that any -Xss values are large enough and are not relying on a minimum of 256 KB.

# Switching the input method in DBCS languages

On double-byte character set (DBCS) systems, if you want to switch the input method, you should use java.util.prefs.Preferences class instead of IBMJAVA_INPUTMETHOD_SWITCHKEY and IBMJAVA_INPUTMETHOD_SWITCHKEY_MODIFIERS environment variables. See Sun's Input Method Framework Specification in detail.

# Runtime example

The Sun Web site, http://java.sun.com, contains a "Hello World" example that you can download. The example demonstrates how to create a simple Java application that runs on the Runtime Environment.

# Installing your application on a user's system

After you develop your product and are ready to ship, you need to install your product on a user's system, configure the user's system to support your software, and configure the runtime environment.

If you use the Runtime Environment for Linux, you must make sure that your installation procedure does not overwrite an existing installation (unless the existing Runtime Environment for Linux is an older version).

To redistribute the Runtime Environment for Linux, you can install it on your own system, then copy the required Runtime Environment files into your installation set. If you choose this approach, you must include all the files provided with the Runtime Environment for Linux. The Runtime Environment for Linux software can be redistributed only if all files are included. In effect, when you ship your application, it has its own copy of the Runtime Environment for Linux.

For specific information about the files that must be redistributed, see the license agreement that accompanies this product.

# Known limitations

The following sections explain known limitations of the SDK for Linux.

- If you are running with a lot of concurrent threads, you might get a warning message: `java.lang.OutOfMemoryError`. This is an indication that your machine is running out of system resources and messages can be caused by the following reasons:
  1. New threads cannot be created because:
     - The number of processes created exceeds your user limit.
     - Not enough system resources are available to create new threads. In this case, you might see also other Java exceptions, depending on what your application is running.
  2. Kernel memory is either running out or is fragmented. You can see corresponding Out of Memory kernel messages in /var/log/messages that have the killed process id.
  Try tuning your system to increase the corresponding system resources.
- During installation, if you have already installed an earlier version of this product that was distributed by Red Hat, the Red Hat Package Manager (RPM) will report that the IBM package is older than any versions of the product that Red Hat has distributed. This condition occurs because Red Hat adds to the RPM package a "serial number" that overrides the versioning scheme of the product in the package, and, by default, the RPM refuses to install a package that seems to be older than one already installed. The --oldpackage option of the rpm command enables you to install the new IBM package.
- In SDK Version 1.4.1, Service Refresh 1, applications that run on symmetric multiprocessor machines (SMP) on SLES 8 perform better with a changed IBM JVM implementation of Java monitors. Because most applications will have either benefits or no change to performance, the new algorithm is now the default behavior. If, on the other hand, the new default setting reduces the performance of your JVM, you can restore the old algorithm by setting the environment variable: `export IBM_JVM_MONITOR_OLD=<any value>`.

  For more information, see the Diagnostics Guide for v1.4.1 SR1.

- If you use audio on a machine without a soundcard, you might get an error message stating that you are out of memory when Java tries to play a sound. The message is displayed in the console, but it does not affect your Java application.
- You might not be able to use the system clipboard with double-byte character set (DBCS) to copy information between Linux applications and Java applications if you are running the K Desktop Environment (KDE).
- The SDK implements Java threads as native threads, which results in each thread being a separate Linux process. If the number of Java threads exceeds the maximum number of processes allowed, your program might get an error message, a SIGSEGV error, or your system might hang.

  The maximum number of threads available is determined by the minimum of:

  - The user processes setting (ulimit -u) in /etc/security/limits.conf
  - The limit that is defined in /proc/sys/kernel/threads_max
  - The limit PTHREAD_THREADS_MAX that is defined in libpthreads.so (change requires glibc to be recompiled)

  However, you might run out of virtual storage before you reach the maximum number of threads.

- If you terminated a Java application with a Ctrl-C, several processes might be left orphaned.
- The javap program, when run on an interface, duplicates the string "interface" in the result. For example, running javap on "java.lang.Runnable" produces:

      public interface interface java.lang.Runnable extends java.lang.Object...

- An attempt to display dialog boxes that are created with Swing might cause a delay of a few seconds before those boxes are displayed in the window.
- KeyEvent results that include the ALT key differ between using different window managers in Linux. They also differ from results of other operating systems. In the Enlightenment window manager, Alt+A and Shift+Alt+A produce different modifiers, and Ctrl+Alt+A produces no key event at all. However, using the WindowMaker window manager, Ctrl+Alt+A produces a key event.
- On the Linux X Window System, the keymap is set to: 64 0xffe9 (Alt_L) 0xffe7 (Meta_L), and 113 0xffea (Alt_R) 0xffe8 (Meta_R). You can check this by typing the following at a shell prompt:

      xmodmap -pk

  This is why the SDK considers that Meta + Alt are being pressed together. As a workaround, you can remove the Meta_x mapping by typing the following at a shell prompt:

      xmodmap -e "keysym Alt_L = Alt_L" -e "keysym Alt_R = Alt_R"

  Note:
  This workaround might affect other X-Window applications that are running on the same display if they use the Meta-key that was removed.
- Creating DSA key pairs of unusual lengths can take a significant amount of time on slow machines. Do not interpret this delay as a hang because the process will complete if you allow enough time. The DSA key generation algorithm has been optimized to generate standard key lengths (for instance, 512, 1024) more quickly than others.
- Native programs cannot create a 1.1 JVM. It is not possible to call JNI_CreateJavaVM() and pass it a version of JNI_VERSION_1_1(0x00010001). The versions that can be passed are:
  - JNI_VERSION_1_2(0x00010002)
  - JNI_VERSION_1_4(0x00010004)

  The JVM created in every case is the one specified by the libraries (that is, 1.2.2, 1.3.x, 1.4.x), not the one that is implied by the JNI interface. The interface API does not affect the language specification that is implemented by the JVM, the class library APIs, or any other area of JVM behavior. The interface API specifies only how native code can invoke the required behavior.

- Although the Linux kernel in the current distributions provides support for Internet Protocol version 6 (IP6), you might encounter problems using it. Support for IP6 from Java is included in this release, but you are advised to turn off the support with the -Djava.net.preferIPv4Stack=true option on the Java command. If you install a kernel that fully supports IP6, you do not need this option.

- For users of Traditional Chinese only, function keys Enter, Space, Backspace, and ESC do not work as expected when using the LinYi ZhuYin, YiTian ZhuYin, and Bosham IMEs to input the TCH characters. The Enter key inserts a new line, the ESC key is used to cancel the preedit strings or the candidate window, and the Space bar inserts a space. The candidate window should disappear after the commit key has been pressed and it should not appear when you press the Backspace key while using the LinYi ZhuYin, YiTian ZhuYin, and Bosham IMEs to input the Traditional Chinese characters.
- (For Simplified Chinese users only) Motif has a problem with GB18030 support when on_demand_loading is set. The visible effect is that combo-boxes can appear to have no text in them. To work around this problem, modify the file XLC_LOCALE and comment out the call to set on_demand_loading. /usr/X11R6/lib/X11/locale/zh_CN.gb18030/XLC_LOCALE has following entry:

      on_demand_loading       True

  To fix the problem, change the entry to:

      #on_demand_loading       True

# Notices

This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to:

- IBM Director of Licensing
  IBM Corporation
  North Castle Drive, Armonk
  NY 10504-1758 U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to:

- IBM World Trade Asia Corporation Licensing
  2-31 Roppongi 3-chome, Minato-ku
  Tokyo 106-0032, Japan

The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law:

INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the information. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this information at any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.

Licensees of this program who wish to have information about it for the purpose of enabling (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact:

- JIMMAIL@uk.ibm.com
  [Hursley Java Technology Center (JTC) contact]

Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.

The licensed program described in this document and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any equivalent agreement between us.

Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurement may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.

## Trademarks

IBM and zSeries are trademarks or registered trademarks of International Business Machines Corporation in the United States, or other countries, or both.

Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Other company, product, or service names may be trademarks or service marks of others.

This product includes software developed by the Apache Software Foundation http://www.apache.org/.