Java 2 SDK, Standard Edition
Java 2 SDK Installation Instructions
Installation of Self-Extracting Binary
Installation of Packages
Java Plug-in Installation Instructions
Java Web Start Installation Instructions
Prior to installing the Java 2 SDK, you should insure that you have installed the full set of required patches needed for support of this release. Recommended and required patches are now hosted for download on the SunSolve website.
See also Solaris Font Package Requirements for information about which font packages should be on your system.
To install the 32-bit Java 2 SDK on either x86 or SPARC processors, follow the installation instructions below.
If you want to install the 64-bit Java 2 SDK on your SPARC platform, you must follow a two-step procedure. First, install the 32-bit Java 2 SDK using the installation instructions below. Second, install the supplemental support for 64-bit operation by following the 64-bit Installation Instructions.
Java 2 SDK 1.4.1 is available in two installation formats.
Note: When installed in the default location, Java 2 SDK 1.4.1 overwrites and replaces any previous installation of Java 2 SDK versions 1.3.0, 1.3.1, or 1.4.0.
Java 2 SDK 1.4.1 will not automatically become the default Java platform. To make Java 2 SDK 1.4.1 the default Java platform, see the note on Selecting the Default Java Platform at the end of this file.Note: For any lines on this page containing the following notation, you must substitute the appropriate Java 2 SDK update version number for the notation.
For example, if you are downloading update 1.4.1_01, the following command:
<version number>would become:
chmod +x j2sdk-1_4_1_<version number>-solaris-sparc.sh
chmod +x j2sdk-1_4_1_01-solaris-sparc.sh
Use these instructions if you want to use the self-extracting binary file to install the Java 2 SDK. If you want to install Solaris packages comprising the SDK, use Installation of Packages below.
1. Check the download file size to ensure that you have downloaded the full, uncorrupted software bundle.Before you download a file, notice that its byte size is provided on the download page on the web site. Once the download has completed, check that you have downloaded the full, uncorrupted software file.2. Make sure that execute permissions are set on the self-extracting binary.On SPARC processors:
chmod +x j2sdk-1_4_1_<version number>-solaris-sparc.sh
On x86 processors:
chmod +x j2sdk-1_4_1_<version number>-solaris-i586.sh
3. Change directory to the location where you would like the files to be installed.
4. Run the self-extracting binary.Launch the self-extracting binary file. The binary code license is displayed, and you are prompted to agree to its terms. The Java 2 SDK files are installed in a directory called j2sdk1.4.1_<version number>.
Note about System Preferences -- By default, the installation script configures the system such that the backing store for system preferences is created inside the Java 2 SDK's installation directory. If the SDK is installed on a network-mounted drive, it and the system preferences can be exported for sharing with Java runtime environments on other machines. As an alternative, root users can use the -localinstall option when running the installation script, as in this example:
This option causes the system preferences to be stored in the /etc directory from where they can be shared only by VMs running on the local machine. You must be root user for the -localinstall option to work.j2sdk-1_4_1_<version number>-solaris-sparc.sh -localinstall
See the Preferences API documentation for more information about preferences in the Java platform.
Use these instructions if you want to use the pkgadd utility to install the Solaris packages for the Java 2 SDK. If you want to use the self-extracting binary file instead, see Self-extracting Binary above.
1. Check the download file size to ensure that you have downloaded the full, uncorrupted software bundle.
Before you download a file, notice that its byte size is provided on the download page on the web site. Once the download has completed, check that you have downloaded the full, uncorrupted software file.
2. Extract the contents of the compressed tar file:On SPARC processors:
zcat j2sdk-1_4_1_<version number>-solaris-sparc.tar.Z | tar -xf -
On x86 processors:
zcat j2sdk-1_4_1_<version number>-solaris-i586.tar.Z | tar -xf -
This creates several packages (SUNWj3dmo, SUNWj3dev, SUNWj3man, SUNWj3rt, plus SUNWj3jmp containing Japanese man pages) along with the product license, README, and other release documentation.
3. Become root by running su and entering the super-user password.
4. Uninstall any Previous Installation of Java 2 SDK.Note: The default installation location for Java 2 SDK's 1.3.0, J2SE 1.3.1, and 1.4.0 releases is /usr/j2se. That is the same location in which Java 2 SDK 1.4.1 is installed. To clear the way for installation of J2SE 1.4.1, in this step you will uninstall any of these previous releases that you may have installed. Skip this step if you have not installed any of these previous releases or if you intend to install Java 2 SDK 1.4.1 in a non-default location.
If you have previously installed the packages for Java 2 SDK 1.3.0, 1.3.1, or 1.4.0, remove them.pkgrm SUNWj3dmo SUNWj3man SUNWj3dev SUNWj3rtIf you have previously installed packages SUNWlj3dv and SUNWlj3rt for localization support in Java 2 SDK 1.3.0, you should also remove them:pkgrm SUNWlj3dv SUNWlj3rt
If you have previously installed the Japanese man page packages for Java 2 SDK 1.3.0 or 1.3.1, remove them also:pkgrm SUNWjej3m SUNWjpj3m SUNWjuj3m
If your /usr/java symbolic link was pointing to the Java 2 SDK 1.2.2 installation at /usr/java1.2, you may want to update it to point to /usr/j2se where Java 2 SDK 1.4.1 will be installed.
On either x86 or SPARC processors:
pkgadd -d . SUNWj3rt SUNWj3dev SUNWj3man SUNWj3dmo
This installs the Java 2 SDK 1.4.1 into /usr/j2se; see the pkgadd(1) and admin(4) man pages for information on installing the SDK in a non-default location.
6. For Japanese users.If you previously installed the man page packages from Java 2 SDK 1.3.0 or 1.3.1, remove them.pkgrm SUNWjej3m SUNWjpj3m SUNWjuj3m
If you have version 1.4.0 Japanese man pages installed, you will need to remove them:pkgrm SUNWj3jmp
Then run the pkgadd command to install the new Japanese man page package:pkgadd -d . SUNWj3jmp
7. Delete the tar files and extracted directories.
8. Exit the root shell.
There are two ways to install/register the Java Plug-in product. Click on the following buttons to see the instructions for either manual or automatic (via the
Java 2 SDK 1.4.1 includes the Java Web Start product. Inside the SDK's jre directory you will find a ZIP file named javaws-1_2_0_<version number>-solaris-sparc-i.zip on SPARC platforms and javaws-1_2_0_<version number>-solaris-i586-i.zip on x86 platforms. The <version number> notation refers to the current Java Web Start version number.
Move this file to a location where you want to install the Java Web Start product (preferably outside the Java 2 SDK installation). Unzip the file. One of the files extracted will be install.sh. Run this script to install the Java Web Start product.
jre/lib/sparc/client/libjvm.so (on SPARC platforms)
jre/lib/i386/client/libjvm.so (on x86 platforms)
jre/lib/sparc/server/libjvm.so (on SPARC)
jre/lib/i386/server/libjvm.so (on x86)
Prior to the Solaris 8 release, the /usr/java symbolic link pointed to /usr/java1.1 if both JDK 1.1 and Java 2 SDK 1.2.2 were installed, making JDK 1.1 the default Java platform. Starting with the Solaris 8 release, the /usr/java symbolic link points to /usr/java1.2 by default if both JDK 1.1 and Java 2 SDK 1.2.2 are installed, making Java 2 SDK 1.2.2 the default Java platform.
Because there are symbolic links in /usr/bin (also known as /bin) that use /usr/java (for example, /usr/bin/java refers to /usr/java/bin/java), this /usr/java link can change the default Java installation seen by most users. Many Java applications run on any of Java 2 SDK 1.4.1, Java 2 SDK 1.3.1, Java 2 SDK 1.2.2, or JDK 1.1, but users and applications might want to be selective about which Java platform installation they use.
It is possible for root users to make Java 2 SDK 1.4.1 the default Java platform by modifying the /usr/java symbolic link to point to /usr/j2se. However, changing the symbolic link in this manner may cause problems for some Java applications that are expecting to use earlier versions of the Java platform. See the online compatibility documentation for information about incompatibilities between Java 2 SDK 1.4.1 and earlier releases.