# IBM 32-bit SDK and Runtime Environment for Windows, Java 2 Technology Edition, Version 1.4.2

# Installation and Configuration 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 32-bit SDK for Windows, Java 2 Technology Edition, Version 1.4.2 and IBM 32-bit Runtime Environment for Windows, Java 2 Technology Edition, Version 1.4.2, and to all subsequent releases, modifications, and service refreshes, until otherwise indicated in new editions.

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

(c) Copyright International Business Machines Corporation, 1999, 2005. 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 provides information about installing and configuring the IBM(R) 32-bit SDK for Windows(R), Java(TM) 2 Technology Edition, Version 1.4.2 and the IBM 32-bit Runtime Environment for Windows, Java 2 Technology Edition, Version 1.4.2.

The SDK is supported on the following products:

- Microsoft(R) Windows(R) 98
- Windows Millennium Edition
- Windows 2000
- Windows XP
- Windows Server 2003

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
Before you install
Attended (interactive) installation
Merging split packages
Installing the packages
Installing both the SDK and the Runtime Environment installable packages
Installing the Runtime Environment as the system Java Virtual Machine
Installing Java Communications API
Unattended installation
Enabling the IBM Accessibility Bridge
Uninstallation
Uninstalling Java Communications API
Uninstalling Web Start
After you install
Obtaining the IBM build and version number
Disabling Java Accessibility Support
The just-in-time (JIT) compiler
Running a Java application
Information for European language users
Any comments on this User Guide?
Notices
Trademarks

# Before you install

Before you can install either the SDK or the Runtime Environment package, you must download the relevant installation package.

You can either download a single large package or you can download several smaller packages. If you choose the latter option, you must also download the Merge utility to combine the parts into a single file.

Ensure that you download all the packages to the same directory. The packages and their file names are listed in Attended (interactive) installation; do not change the packages' file names.

Before you begin to install, ensure that there is enough space in your C:\WINDOWS\TEMP directory to use during installation. The amount of temporary space required in the TEMP directory during installation is:

- SDK installable package: 130 MB
- Runtime Environment installable package: 85 MB

If you do not have enough temporary space, the installation program generates an error and terminates the installation. If you do have enough temporary space but still see this message, verify that the packages you are attempting to install were downloaded completely. You can do this by comparing the file sizes of your packages to the file sizes shown on the Web pages from which you downloaded the packages.

# Attended (interactive) installation

The packages you can install are:

- SDK installable package: ibm-java2-sdk-142.exe
- Runtime Environment installable package |(any hardware): ibm-java2-jre-142.exe
- |Runtime Environment installable package (IBM hardware |only): ibm-java2-jre-ibm-142.exe

In addition, there is another package you can install:

- Java Communications Application Programming Interface (API) for Windows package -- ibm-javacomm-n142p-win32-x86.zip

This package is provided as a zip file. See the section Installing Java Communications API for installation instructions.

Other packages are provided as zip files:

- Runtime Environment package for redistribution: ibm-jre-n142p-win32-x86.zip
- Documentation package: ibm-docs-n142p-win32-x86.zip
- Demos package: ibm-demos-n142p-win32-x86.zip
- Debug version of SDK: ibm-sdk_g-n142p-win32-x86.zip

## Merging split packages

If you downloaded the split packages, you must use the Merge utility to put them back together:

- Downloaded the Merge utility: mergeutility.exe.
- Launch mergeutility.exe. This extracts the Merge utility (called merge) and its required data file.
- Launch the file merge. The split packages will be merged into a single file.
  Note:
  If you did not download all the parts of the package or if you changed the file names of the parts when you downloaded them, the Merge utility displays an error message and the packages are not merged.

To merge the files manually, at a command prompt, type:

    copy /b ibm-java2-sdk-win32-142.ex1 + ibm-java2-sdk-win32-142.ex2 + ibm-java2-sdk-win32-142.ex3 ... ibm-java2-sdk-win32-142.exe

Remember to specify all the file names.

## Installing the packages

To install the packages:

1. Launch either ibm-java2-sdk-win32-142.exe (for the SDK) or ibm-java2-jre- win32-142.exe (for the Runtime Environment only).
2. Follow the instructions in the installation wizard.

## Installing both the SDK and the Runtime Environment installable packages

If you downloaded the SDK installable package, the following selections are displayed in the installation wizard:

- Java Runtime Environment
- SDK
- Source

If you select SDK, the Runtime Environment is also installed. The Runtime Environment is installed by default in the C:\Program Files\IBM\Java142\jre directory.

## Installing the Runtime Environment as the system Java Virtual Machine

When you install the Runtime Environment (either as part of the SDK installable package or from the Runtime Environment installable package), you are asked whether you want to install the Runtime Environment as the system Java Virtual Machine (JVM). If you do install it as the system JVM, the installation program copies the java.exe and javaw.exe files into the Windows system directory. If a version of java.exe or javaw.exe currently exists in the Windows system directory, you are prompted to overwrite the existing version with the current version. Installing these files into the Windows system directory makes this Runtime Environment the default JVM for the system. In addition, the "Current Version" registry key is set to match this installation.

Note:
Installing the Runtime Environment as the system JVM copies ONLY java.exe and javaw.exe into the Windows system directory. No other executables (such as javac.exe or appletviewer.exe) are copied.

## Installing Java Communications API

Before you install the Java Communications API package, install the Runtime Environment, either as part of the SDK package or from the Runtime Environment package.

To install the Java Communications API:

1. Place the Java Communications API zip file, ibm-javacomm-n142p-win32-x86.zip, in the directory where the Runtime Environment is installed. If you installed to the default directory, this is the C:\Program Files\IBM\Java142\ directory.

2. Unzip the file. The following files are extracted as shown:
   - jre\lib\ext\comm.jar
   - jre\bin\ibmcomm.dll
   - jre\lib\javax.comm.properties
   - docs\javacomm\license.html
   - docs\javacomm\javacommguide.win32.htm
   - copyright

   For example, if you accepted the default directory when you installed the Runtime Environment, the comm.jar file is in the C:\Program Files\IBM\Java142\jre\lib\ext directory.

   If you unzip the file in another directory, the files are placed in the same directory structure, but C:\Program Files\IBM\Java142\ is replaced by the directory where you unzipped the file.

# Unattended installation

To complete an unattended installation, you must first complete an attended installation and create a response file (setup.iss) that records the choices you made during installation. To work properly, the response file you create must be correct for the computers on which you plan to use it. If necessary, create several response files to use for installing the packages on computers that have different configurations.

To create a response file while running the installation, type the following at a command prompt:

        ibm-java2-sdk-142 /r

or

        ibm-java2-jre-142 /r

Depending on your Windows product, a response file (setup.iss) is created in either the C:\Windows or C:\Winnt directory, where C: is the boot drive.

The following message might occur during an interactive installation:

       Another Java Runtime Environment is currently
       installed as the System JVM. Select Yes to
       overwrite this version or No to exit this
       installation.

If this message is displayed, select No and exit from the installation. Go to the Windows system directory and delete the following two files:

- java.exe
- javaw.exe

After you have deleted the files, restart the interactive installation using the command shown at the beginning of this section.

On the system on which you will run the unattended installation, copy the setup.iss response file to either the C:\Windows or the C:\Winnt directory. After you have copied the file to the correct directory, type the following at a command prompt:

        ibm-java2-sdk-142 /s /f1c:\Windows\setup.iss /f2c:\setup.log
        ibm-java2-jre-142 /s /f1c:\Windows\setup.iss /f2c:\setup.log

Notes:

1. In the command shown, use the C:\Windows or C:\Winnt directory depending on your Windows product.
2. There are no spaces after `/f1` or `/f2`.
3. The `/f1` flag specifies the name and location of the response file. The `/f2` flag specifies the name and location of the log file.

If the installation is successful, the log file contains `ResultCode=0`.

# Enabling the IBM Accessibility Bridge

IBM Accessibility Bridge includes four files that are placed in the proper directories during the default JRE 1.4.2 installation. These files and their directories are:

Table 1. IBM Accesibility Bridge files.
File | Directory
--- | ---
JawBridge.jar | jre\lib\ext
JawBridge.dll | jre\bin
Accessibility.properties | jre\lib
jaccess.jar | jre\lib\ext

IBM Accessibility Bridge is installed but disabled by default. To enable IBM Accessibility Bridge, delete the number sign from the beginning of the following line in the Accessibility.properties file:

    #assistive_technologies=JawBridge

This Web site tells you more about the Accessibility Utilities:

http://java.sun.com/products/jfc/accessibility.html

# Uninstallation

To uninstall the SDK, whether you installed using attended or unattended installation:

1. Double-click My Computer on the Windows desktop.
2. Double-click Control Panel.
3. Double-click Add/Remove Programs.
4. Click IBM 32-bit SDK for Java 2 v1.4.2 in the list, and then click Change/Remove.
5. Click OK.

This removes all of the packages that are installed with the Installer. It does not remove the Java Communications API package or any additional files that have been extracted from the zip packages.

Note: Warning messages might be displayed notifying you that not all files, or registry entries, or both, were removed. This is because Windows believes that certain files are still in use; these files, or registry entries, or both, will be removed during the next reboot.

When you maintain multiple installations between the IBM 32-bit SDK for Windows, v1.4.2, and versions at v1.3.1 or earlier, if you uninstall the earlier version while a version 1.4.2 is still installed on the system, the 1.3.1 uninstaller removes the following registry keys, and all the subkeys, that are required by the 1.4.2 version thereby corrupting the 1.4.2 installation:

- HKEY_LOCAL_MACHINE/Software/IBM/Java2 Runtime Environment
- HKEY_LOCAL_MACHINE/Software/IBM/Java Development Kit

Therefore, reinstall 1.4.2 after uninstalling the 1.3.1 version. This uninstaller limitation has been fixed for 1.4.0 and any subsequent release.

## Uninstalling Java Communications API

To uninstall the Java Communications API package, delete the following files from the directory where you installed the Runtime Environment:

- jre\lib\ext\comm.jar
- jre\bin\ibmcomm.dll
- jre\lib\javax.comm.properties
- docs\javacomm\license.html
- docs\javacomm\javacommguide.win32.htm
- copyright

By default, the Runtime Environment is installed in the C:\Program Files\IBM\Java142\ directory.

## Uninstalling Web Start

When uninstalling Web Start, any Windows desktop icons that were created for icons downloaded using Web Start will not be removed.

# After you install

The following sections provide basic information about using IBM 32-bit SDK for Windows, v1.4.2.

## Obtaining the IBM build and version number

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

`java -version`

## Disabling Java Accessibility Support

You can disable or enable Java Accessibility support using the JAVA_ASSISTIVE environment variable. To prevent the JVM from loading Java Accessibility support, set the JAVA_ASSISTIVE environment variable to OFF. Disabling the JAVA_ASSISTIVE environment variable is a good idea if you are running the JVM through network access and you have no need for the Java Accessibility support that the JVM loads by default. Disabling the JAVA_ASSISTIVE environment variable increases the JVM loading performance of Java applications that do not provide Java assistive technology support.

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

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

The SDK for Windows includes the JIT (jitc.dll), 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.

There are two ways to disable the JIT:

- Type at a command prompt:

      set JAVA_COMPILER=NONE

  On Windows NT, Windows 2000, Windows XP, and Windows Server 2003 you can also permanently set JAVA_COMPILER from the Environment settings of the System properties. (For Windows NT, select the Control Panel, and select System and then select Environment. For Windows 2000, Windows XP, and Windows Server 2003 select the Control Panel and System, and on the Advanced tab select Environment Variables).
- Use the -D option on the java command to set java.compiler to NONE:

      java -Djava.compiler=NONE myapp

To enable the JIT, type at a command prompt:

        set JAVA_COMPILER=jitc

To verify whether or not the JIT is enabled, type at a command 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)

## Running a Java application

To run a Java application, type the following at a command prompt:

        java classname

where `classname` is the name of the Java class file (Java application) that you want to run.

Note: If you did not install the Runtime Environment as the system JVM, you must first set the path to include the appropriate directories. To update the path, type the following at a command prompt:

        set path=javadir\bin;javadir\jre\bin

where `javadir` is the directory where you installed the Runtime Environment. By default, this directory is C:\Program Files\IBM\Java142\.

If you are developing Java applications, see the SDK User Guide for more detailed information about setting the `PATH` and the `CLASSPATH`.

# Information for European language users

In Windows, a process has two codepages: the Ansi (or Windows) codepage and the OEM (or DOS) codepage.

The command window normally uses the OEM codepage. Java converts console output to the codepage of the command window from which Java is started. The javaw command always uses the Ansi codepage. You specify the codepage to use for console output with the -Dconsole.encoding option on the java command. For example, -Dconsole.encoding=Cp1252 causes all console output to be in the Windows Ansi Latin1 codepage (1252).

# 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:

- By e-mail to idrcf@hursley.ibm.com.
- By fax:
  - From the UK: 01962 842327
  - From elsewhere:<international code>44 1962 842327
- By mail to:
  IBM United Kingdom Ltd
  User Technologies,
  Mail Point 095
  Hursley Park
  Winchester
  Hampshire
  SO21 2JN United Kingdom

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:

- 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 is a trademark 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.

Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.

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

This product is also based in part on the work of the FreeType Project. For more information about Freetype, see http://www.freetype.org.

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