IBM Runtime Environment for Linux platforms, Java 2 Technology Edition, Version 1.4.2

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 these platforms as they become available:

and to all subsequent releases, modifications, and service refreshes, until otherwise indicated in new editions.

© Copyright Sun Microsystems, Inc. 1997, 2003, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.

© Copyright International Business Machines Corporation, 1999, 2008. All rights reserved.

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

Preface

This User Guide describes the IBM® Runtime Environment for all Linux® platforms. Platform-specific information is clearly marked as such. Ensure that you are reading material relevant to your platform. In particular, Web Start and the Plug-in are specific to the 32-bit SDK for Linux on Intel® architecture.

The IBM Runtime Environment 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.

The IBM JVM Diagnostics Guide provides more detailed information about the IBM JVM.

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

From Version 1.4.2, Service Refresh 8, on Linux IA32 only, these Virtualized Environments are supported: VMWare, Xen, and MS Virtual Server.

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 made to this User Guide for Version 1.4.2, other than minor or obvious ones such as updating "1.4.1" to "1.4.2", are indicated in red when viewing in HTML or in a color-printed copy and by vertical bars to the left of the changes.

Contents

Copyright information
Preface
Overview
Conventions
Version compatibility
Information for Linux PPC64 users
Files included with the Runtime Environment for Linux
License agreement
The just-in-time (JIT) compiler
The Java Native Interface and the Native Method Interface
Using a JPackage compatible format
Installing on Red Hat Enterprise Linux (RHEL) 3 (zSeries only)
Installing on Red Hat Enterprise Linux (RHEL) 4 or 5
Running Java with SELinux on RHEL 5
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
JDBC/ODBC bridge reinstated
Launching a Java application
Summary of commands
Options
Standard options
Non-standard options
Globalization of the java command
Working with classpaths
Configuring large page memory allocation
Working with the bootclasspath
Specifying garbage collection policy
Pause time
Pause time reduction
Environments with very full heaps
Further information about garbage collection
How the JVM processes signals
Signals used by the JVM
Linking a native code driver to the signal-chaining library
Implementing the Connection Handler Pool for RMI
Obtaining the IBM build and version number
(Linux IA 32-bit only) Using the Java Plug-in
Installing and configuring the Java Plug-in for Mozilla
Installing and configuring the Java Plug-in for Firefox
Installing and configuring the Java Plug-in for Netscape
Locating JVM libraries for the browser Plug-in
Using DBCS parameters
(Linux IA 32-bit only) Using Web Start
Installing Web Start
Working with floating stacks
(Linux IA 32-bit only) Preventing buffer overruns with NX/XD bit support
Switching the input method in DBCS languages
Installing your application on a user's system
Known limitations
Limitations that apply to all Linux platforms except where indicated
Linux IA 32-bit limitations
Linux PPC 32-bit and 64-bit limitations
Linux PPC 32-bit limitations
Linux PPC 64-bit limitations
Linux zSeries 64-bit limitations
Linux zSeries 32-bit and 64-bit limitations
Any comments on this User Guide?
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.

Conventions

Throughout this User Guide the default installation directory of the SDK is referred to as /opt/IBMJava2-142/. The platforms listed below have the following default installation directories; use the appropriate directory for your platform when you see /opt/IBMJava2-142/:

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.2 APIs work only on browsers that support Java 1.4.2 APIs.

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

Information for Linux PPC64 users

Unlike PPC32, the Runtime Environment v1.4.2 is not supported on SLES 8.

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.

In addition, the Java Communications application programming interface (API) package is provided for use with the Runtime Environment for Linux. (Except on Linux IA 64-bit and Linux zSeries 31-bit and 64-bit).

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 Java Native Interface and the Native Method Interface

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.

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

Using a JPackage compatible format

From Version 1.4.2 Service Refresh 7, the IBM SDK for Java, v1.4.2 is also available in a JPackage compatible format.

To simplify managing the SDK, the various components of it are now available as separate RPMs: the base Java Runtime Environment, Development Kit, Plug-in, JDBC, Demo, Sound, Source, and Fonts. "jpackage-utils" RPM (downloadable from http://jpackage.org), which allows managing multiple Java RPMs on a system, is a prerequisite for the IBM SDKs. For more information about the JPackage specification, see http://jpackage.org.

If you install the SDK using JPackage, it will not be installed in the default location. See the "Directory Structure" section of the JPackage Java™ infrastructure design and packaging policy for details about the default JPackage installation location: http://www.jpackage.org/cgi-bin/viewvc.cgi/src/jpackage-utils/doc/jpackage-1.5-policy.xhtml?root=jpackage&view=co.

JPackage is not supported on SLES9 or SLES10 platforms.

Installing on Red Hat Enterprise Linux (RHEL) 3 (zSeries only)

The zSeries 31-bit and 64-bit SDKs depend on shared libraries that are not installed by default for Red Hat Enterprise Linux (RHEL) 3.0.

The RPM that contains these libraries is:

To include this library during RHEL 3 installation:

  1. When you reach the Package Defaults screen, select Customize the set of packages to be installed.
  2. At the Package Group Selection screen, under Development Options, select Legacy Software Development.

Installing on Red Hat Enterprise Linux (RHEL) 4 or 5

For RHEL 4 and 5, the SDK depends on shared libraries that are not installed by default.

In RHEL 4, the RPMs that contain these libraries are:

To include these libraries during RHEL 4 installation:

  1. When you reach the Package Defaults screen, select Customize the set of packages to be installed.
  2. At the Package Group Selection screen, under X Windows System, choose Details and make sure that you have selected xorg-x11-deprecated-libs.
  3. Under the Development options, select Legacy Software Development.

In RHEL 5, the RPMs that contain these libraries are:

To include these libraries during RHEL 5 installation:

  1. At the software selection screen, select Customize now.
  2. On the next screen, in the left-hand panel, select Base System; in the right-hand panel, select Legacy Software Support. These selections will install the compat-libstdc++ packages.
  3. The libXp package is required but is not available to select for installation from the install GUI. When installation is complete, open a shell, locate the libXp package on your Red Hat installation media, and install it. For example, to install on a 32-bit Intel platform:
    rpm -i /media/cdrom/Server/libXp-1.0.0-8.i386.rpm

Running Java with SELinux on RHEL 5

To run the IBM SDK for Java on Red Hat Enterprise Linux Version 5 with SELinux enabled, Java must be installed in the default directory. If Java is not installed in the default directory, enter:

chcon -R -t texrel_shlib_t path_of_sdk

(Where path_of_sdk is the path where Java is installed).

For more information about SELinux, see http://www.redhat.com/magazine/006apr05/features/selinux/

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-142/jre/bin

If you installed the Runtime Environment for Linux in a different directory, replace /opt/IBMJava2-142/ with the directory in which you installed the Runtime Environment.

Note:
(For Linux IA 32-bit Chinese users only) Because of inconsistencies in the font encodings on Red Hat Advanced Server, when you install for an environment in which you want Chinese to be the default language, it is better to install with a default language of English and then change to Chinese after the installation is complete. Otherwise, you might find that the Chinese fonts do not display.

Uninstalling the Runtime Environment for Linux

The way you remove the Runtime Environment 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: (Where "x.x" indicates the Service Refresh level: "5.0", for example.)

    As an alternative to typing at a shell script, 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.
  3. (Linux IA 32-bit only) If you installed the Java Plug-in, remove the Java Plug-in files from the web browser directory.

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.
  3. (Linux IA 32-bit only) If you installed the Java Plug-in, remove the Java Plug-in files from the web browser directory.

JDBC/ODBC bridge reinstated

The JDBC/ODBC bridge, which had been removed from the IBM SDK, v1.4.0, has been reinstated for v1.4.2.

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.

From Version 1.4.2 Service Refresh 4, using the -jar command-line option will make the .jar file the source of all user classes; all other user CLASSPATH settings will be ignored.

To be able to use a .jar file with other CLASSPATH settings, add the .jar file to the CLASSPATH as above, and specify the startup class manually.

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 nonstandard options.

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.

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 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 were 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.

From Version 1.4.2 Service Refresh 4, using the -jar command-line option will disable the use of a CLASSPATH.

Configuring large page memory allocation

Large page usage is primarily intended to provide performance improvements to applications that allocate a lot of memory and frequently access that memory. The large page performance improvements are mainly caused by the reduced number of misses in the Translation Lookaside Buffer (TLB). This improvement is caused by the TLB mapping a larger virtual memory range.

To configure large page memory allocation, first ensure that the running kernel supports large pages. Check that the file /proc/meminfo contains the following lines:

HugePages_Total:     4
HugePages_Free:      4
Hugepagesize:     4096 kB

Note that the values of these fields are system-dependent. If the kernel does not support large pages, you must compile a new kernel with large page support.

The amount of memory that you can allocate to large pages is given by the product of HugePages_Free * Hugepagesize. The system administrator should configure the number of large pages in the system to satisfy Java's heap requirements. The system administator can configure the number of large pages by editing the file /proc/sys/vm/nr_hugepages.

Sometimes, when the system has an adequate number of free large pages available, the call to shmget() for large page memory allocation fails. This failure occurs because the huge pages are not contiguous. To prevent this failure, the system administrator must specify the hugepages=<n> option at system bootup (rather than doing it later through /proc).

shmget(), which uses shmmax, allocates large page memory. To modify the value of shmmax, edit the file /proc/sys/kernel/shmmax.

Note that shmget() succeeds only if it is being run by root. To use large pages, you can either run Java as root or set the suid bit of the Java executable.

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 is defined using the -Xbootclasspath: option.

Do not deploy applications that use the -Xbootclasspath: or -Xbootclasspath/p: 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.

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 v1.4.2 and can be used to determine what caused the high occupancy of the Java heap. The Diagnostics Guide is on developerWorks®, at: http://www.ibm.com/developerworks/java/jdk/diagnosis/142.html. 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.html

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:

For information about how to write a launcher that specifies the above hooks, see: http://www.ibm.com/developerworks/java/library/i-signalhandling/. This item 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:

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:

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.2/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 must 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 Runtime Environment contains a 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:

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

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.

Implementing the Connection Handler Pool for RMI

Thread pooling for RMI Connection Handlers is not enabled by default.

To enable the connection pooling implemented at the RMI TCPTransport level, set the option

-Dsun.rmi.transport.tcp.connectionPool=true (or any non-null value) 

This version of the Runtime Environment does not have any setting that you can use to limit the number of threads in the connection pool.

Obtaining the IBM build and version number

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

java -version

(Linux IA 32-bit only) Using the Java Plug-in

The Java Plug-in is a Web browser plug-in. If you use the Java Plug-in, you can bypass your Web browser's default JVM and use instead a Runtime Environment for running applets or beans in the browser.

The Java Plug-in is documented by Sun at: http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/.

The Java Plug-in is supported on Netscape 4, Netscape 6, Mozilla 1.4, 1.6, and 1.8, and Firefox 2.0 and 3.0, as provided by default with your distribution.

Installing and configuring the Java Plug-in for Mozilla

Mozilla 1.4 and later are compiled with gcc 3.x. So a gcc 3.x compatible version of the Java plugin must be used. From v1.4.2 onwards, IBM SDK for Linux is being shipped with an additional gcc3 compiled plug-in library (libjavaplugin_ojigcc3.so), to make the plug-in compatible with the later updates of Mozilla browser.

To make the Java Plug-in available to all users:

  1. Log in as root.
  2. Change to your Mozilla plug-ins directory (this could be different on some Linux distributions) .
    cd /usr/local/mozilla/plugins/
  3. Create a symbolic link to libjavaplugin_ojigcc3.so.
    ln -s /opt/IBMJava2-142/jre/bin/libjavaplugin_ojigcc3.so.
Note:
libjavaplugin_ojigcc3.so should be symbolically linked instead of copied; otherwise, it will not be able to find the location of the JVM.

For earlier versions of Mozilla (below 1.4),

To make the Java Plug-in available to all users:

  1. Log in as root.
  2. Change to your Mozilla plug-ins directory (this could be different on some Linux distributions).
    cd /usr/local/mozilla/plugins/
  3. Create a symbolic link to libjavaplugin_oji.so.
    ln -s /opt/IBMJava2-142/jre/bin/libjavaplugin_oji.so.
Note:
libjavaplugin_oji.so must be symbolically linked instead of copied; otherwise, it will not be able to find the location of the JVM.

Installing and configuring the Java Plug-in for Firefox

To make the Java Plug-in available to all users:

  1. Log in as root.
  2. Change to your Firefox plug-ins directory (this could be different on some Linux distributions) .
    cd /usr/local/mozilla-firefox/plugins/
  3. Create a symbolic link to libjavaplugin_ojigcc3.so.
    ln -s /opt/IBMJava2-142/jre/bin/libjavaplugin_ojigcc3.so.
Note:
libjavaplugin_ojigcc3.so must be symbolically linked instead of copied; otherwise, it will not be able to find the location of the JVM.

Installing and configuring the Java Plug-in for Netscape

To install and configure the Java Plug-in for Netscape 6, make a symbolic link from the library file /opt/IBMJava2-142/jre/bin/javaplugin_oji.so to your browser's plugins directory (/browser-install-path/plugins).

  1. Log in as root.
  2. Change to your Netscape plugins directory (this could be different on some Linux distributions).
    cd /usr/local/netscape/plugins/
  3. Put a symbolic link to the javaplugin_oji.so into the plugin directory.
    ln -s /opt/IBMJava2-142/jre/bin/javaplugin_oji.so .
Note:
javaplugin_oji.so should be symbolically linked instead of copied; otherwise, it will not be able to find the location of the JVM.

To install and configure the Java Plug-in for Netscape 4, make a symbolic link from the library file /opt/IBMJava2-142/jre/bin/javaplugin.so to your browser's plugins directory (/browser-install-path/plugins).

To make the Java Plug-in available to the current user:

  1. Create a directory called plugins under the $HOME/.netscape directory if it does not already exist.
  2. Make a symbolic link from the library file /opt/IBMJava2-142/jre/bin/javaplugin.so to /$HOME/.netscape/plugins.

To make the Java Plug-in available to all users:

  1. Log in as root.
  2. Put a symbolic link to the library file /opt/IBMJava2-142/jre/bin/javaplugin.so into the plugin directory (usually /usr/local/netscape/plugins/, although this might vary on some distributions).
    ln -s /opt/IBMJava2-142/jre/bin/javaplugin.so \
       /usr/local/netscape/plugins/
Note:
javaplugin.so should be symbolically linked instead of copied; otherwise, it will not be able to find the location of the JVM.

Locating JVM libraries for the browser Plug-in

From Java 1.4.2 Service Refresh 6, you no longer need to set the LD_LIBRARY_PATH environment variable to use the browser Plug-in.

Using DBCS parameters

The Java Plug-in supports double-byte characters (for example Chinese Traditional BIG-5, Korean, Japanese) as parameters for the tags <APPLET>, <OBJECT>, and <EMBED>. You must select the correct character encoding for your HTML document so that the Java Plug-in can parse the parameter. Specify character encoding for your HTML document by using the <META> tag in the <HEAD> section like this:

<meta http-equiv="Content-Type" content="text/html; charset=big5">

This example tells the browser to use the Chinese BIG-5 character encoding to parse the HTML file using. All the parameters are passed to the Java Plug-in correctly. However, some of the older versions of browsers might not understand this tag correctly. In this case, you can force the browser to ignore this tag, but you might have to change the encoding manually.

You can specify which encoding you want to use to parse the HTML file:

(Linux IA 32-bit only) Using Web Start

Java Web Start is a way of deploying Java technology-based applications. It connects the computer and the Internet and allows the user to launch and manage applications directly from the Web. Java Web Start provides one-click activation of applications, and ensures that you are always running the latest version, eliminating installation or upgrade procedures. Often, distributing software across the Web requires you to find the installer on the Web, download the installer, locate the installer, and execute the installer. After the installer is executed, it prompts for installation directories and installation options such as full, typical, or minimum. This can be a time-consuming and complicated task that must be repeated for each new version of the software.

In contrast, Web-deployed applications, such as your HTML-based e-mail client and calendar, are straightforward to install and use. The Web browser has automated the process. There are no complicated download, setup, and configuration steps, and you are guaranteed to be running the latest version. Java Web Start provides the same benefits to full-featured applications.

For more information about Web Start, see: http://java.sun.com/products/javawebstart and for more documentation, see: http://java.sun.com/j2se/1.4.2/docs/guide/jws/index.html.

Installing Web Start

Web Start is installed as part of the RPM installable package. No separate Web Start installation script is provided. Web Start is located in <java_home>/jre/javaws.

The installation process also updates the mime-types that are used by Mozilla and other browsers.

You can invoke Web Start in three ways:

All these actions cause Web Start to start the selected application. The application is downloaded if this is the first time it is being used. On later invocations, the original Web site is checked to see whether any updates are available. Web Start downloads these updates before the application is started.

If an error (such as an invalid tag name) occurs in a .jnlp file, Web Start fails without displaying an error message.

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.

(Linux IA 32-bit only) Particular Linux distributions - Red Hat, for example - have enabled a GLIBC feature called 'floating stacks'. Because of Linux kernel limitations, the JVM does not run on SMP hardware with floating stacks enabled if the kernel level is less than 2.4.10. In this environment, floating stacks must be disabled before the JVM, or any application that starts the JVM, is started. On Red Hat, use this command to disable floating stacks by exporting an environment variable:

export LD_ASSUME_KERNEL=2.2.5

(Linux IA 32-bit only) Preventing buffer overruns with NX/XD bit support

NX/XD is a security feature that prevents the exploitation of buffer overruns. It changes the default access of memory regions to be non-executable. NX/XD bit support for Linux IA32 running on IA32, IA64, and AMD64/EM64T processors with RHEL3U3 and SLES9 is made available in Service Refresh 2 of the IBM Version 1.4.2 Runtime Environment.

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.

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 Runtime Environment for Linux.

Limitations that apply to all Linux platforms except where indicated

Linux IA 32-bit limitations

Linux PPC 32-bit and 64-bit limitations

Linux PPC 32-bit limitations

Linux PPC 64-bit limitations

Linux zSeries 64-bit limitations

The following limitations apply to users of Chinese, Taiwanese, and Korean on Linux zSeries 64-bit:

Linux zSeries 32-bit and 64-bit limitations

Any comments on this User Guide?

If you have any comments about the usefulness, or otherwise, of this User Guide, we would be pleased to hear from you through one of these channels. Please note that these channels are not set up to answer technical queries, but are for comments about the documentation only. Send your comments:

The fine print. By choosing to send a message to IBM, you acknowledge that all information contained in your message, including feedback data, such as questions, comments, suggestions, or the like, shall be deemed to be non-confidential and IBM shall have no obligation of any kind with respect to such information and shall be free to reproduce, use, disclose, and distribute the information to others without limitation. Further, IBM shall be free to use any ideas, concepts, know-how or techniques contained in such information for any purpose whatsoever, including, but not limited to, developing, manufacturing and marketing products incorporating such information.

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:

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

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:

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, developerWorks, iSeries, pSeries, PowerPC, AS/400, 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 are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other countries.

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/.