Java 2 SDK Installation Instructions
Installation of Self-Extracting Binary
Installation of Solaris Packages
Java Plug-in Browser Registration Instructions
Java Web Start Installation Notes
General Installation Notes
Solaris Package Uninstall Bug
Solaris Package Install - Selecting the Default Java Platform
Location of Java VM Library Files (libjvm.so)
Note that for x86 processors, display color depth should be set to 16 bit or higher.
Prior to installing the Java 2 SDK, you should ensure 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.
Installing the SDK automatically installs the Java Plug-in and Java Web Start. Note that the Java Plug-in needs to be registered with the browser. Instructions for doing so can be found below at Java Plug-in Browser Registration Instructions.
To install the 32-bit Java 2 SDK, follow the installation instructions below.
To install the 64-bit Java 2 SDK on a 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.
chmod +x j2sdk-1_4_2_<version>-solaris-sparc.sh
chmod +x j2sdk-1_4_2_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 Solaris Packages below.
1. Download and check the file size to ensure that you have downloaded the full, uncorrupted software bundle.You can download to any directory you choose; it does not have to be the directory where you want to install the Java 2 SDK.2. Make sure that execute permissions are set on the self-extracting binary.
Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.On SPARC processors:
chmod +x j2sdk-1_4_2_<version>-solaris-sparc.sh
On x86 processors:
chmod +x j2sdk-1_4_2_<version>-solaris-i586.sh
3. Change directory to the location where you would like the files to be installed.The next step installs the Java 2 SDK into the current directory.
4. Run the self-extracting binary.Execute the downloaded file, prepended by the path to it. For example, if the file is in the current directory, prepend it with " ./" (necessary if " ." is not in the PATH environment variable):
On SPARC processors:
On x86 processors:
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.2_<version> in the current directory. Follow this link to see its directory structure. The Java 2 SDK documentation is a separate download.
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 installed 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_2_<version>-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 Installation of Self-extracting Binary above.
1. Download and check the file size to ensure that you have downloaded the full, uncorrupted software bundle.You can download to any directory you choose.
Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.
2. Extract the contents of the compressed tar file:On SPARC processors:
zcat j2sdk-1_4_2_<version>-solaris-sparc.tar.Z | tar -xf -
On x86 processors:
zcat j2sdk-1_4_2_<version>-solaris-i586.tar.Z | tar -xf -
This creates several directories (SUNWj3dmo, SUNWj3dev, SUNWj3cfg, SUNWj3man, SUNWj3rt, and SUNWj3jmp) in the current directory.
3. Become root by running su and entering the super-user password.
4. Uninstall any 1.3.x or 1.4.x Installation of Java 2 SDK.Note: The default installation location for the Solaris package installations of previous releases Java 2 SDK 1.3.0, 1.3.1, 1.4.0, and 1.4.1 is /usr/j2se. That is the same location in which 1.4.2 is installed. To clear the way for installation of 1.4.2, in this step you must uninstall any of these previous releases that are installed. Skip this step if none of these previous releases is installed or if you intend to install Java 2 SDK 1.4.2 in a non-default location. For more details, see Selecting the Default Java Platform.Note About Uninstall Bug: Please note that there is a bug in the uninstall scripts associated with some of the Java 2 SDK packages. See the Bug in Uninstall of Solaris Packages for more information.
If you have previously installed the Solaris packages for Java 2 SDK 1.3.0, 1.3.1, 1.4.0, or 1.4.1, remove them by running: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
On either x86 or SPARC processors, run:
pkgadd -d . SUNWj3rt SUNWj3cfg SUNWj3dev SUNWj3man SUNWj3dmo
This installs the Java 2 SDK 1.4.2 into /usr/j2se; see the pkgadd(1) and admin(4) man pages for information on installing the SDK in a non-default location.Note About Default Java Platform: To get the version number of the Java platform that is installed, run:
/usr/j2se/bin/java -fullversionJava 2 SDK 1.4.2 will automatically become the default Java platform on Solaris 9 but not necessarily on earlier versions of Solaris. The default Java platform is determined by the /usr/java symbolic link. If the /usr/java symbolic link is not pointing to the /usr/j2se directory (where Java 2 SDK 1.4.2 was just installed), then you may want to update it to point there. For more details, see Selecting the Default Java Platform.
6. For Japanese users: Install man pages.If you previously installed the man page packages from Java 2 SDK 1.3.0 or 1.3.1, remove them by running: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 SUNW* directories.
8. Exit the root shell.
There are two ways to register the Java Plug-in product with the Netscape 6 browser. Click on the following buttons to see the instructions for either manual or automatic (via the
ControlPanel) registration. For Netscape 7 or Mozilla, use only the manual instructions. Note that Mozilla must be version 1.1 or higher.
This SDK release includes Java Web Start; Java Web Start is automatically installed with the SDK. But note the following:
- Compatibility: The release of Java Web Start that comes with this SDK/JRE can be run on SDK/JRE 1.2.2 or later. It will not work with SDK/JRE 1.1.x or earlier.
- Upgrading from Previous Versions: This new release will overwrite previous installations and automatically update browsers to use this new release. The configuration files and program files folder used by Java Web Start have changed, but all your settings will remain intact after the upgrade, since Java Web Start will translate your settings to the new form.
- Using Java Web Start with Netscape 6.x/7.x: For Netscape 6.x/7.x users, setup the Java Web Start MIME type (JNLP) in the Edit->Preferences->Navigator->Helper Applications section. The file extension is
jnlp; MIME Type is
application/x-java-jnlp-file. It should be handled by the
pkgaddutility use: (1) If you use the
pkgaddutility to install the Solaris packages for Java 2 SDK/JRE 1.4.2, a symbolic link for
../j2se/jre/javaws/javawswill be created in
/usr/bin. (2) If you have a previous release of Java Web Start installed and you want the latest version to run instead, edit the
$HOME/.mailcapfile so that it is identical to
/etc/.mailcap. If you want the older version of Java Web Start to run, do not edit
General Installation NotesA bug in the uninstall scripts for packages SUNWj2rt, SUNWj3rt, SUNWj2dev and SUNWj3dev can prevent those packages from being removed during a Disk Space Reallocation (DSR) upgrade. You will see the bug if upgrading from a Solaris version which doesn't have the fix for this bug. This bug was fixed in versions 1.2.2_12, 1.3.1_04 and 1.4.0_00.
In order to do a DSR upgrade, these packages first must be manually removed using the pkgrm command. See bug report 4635483 for more information.
To get the version number of the Java platform that is installed, use the
-fullversionoption as shown in the next section.
To detect which version of a Solaris package is installed, run pkginfo and grep for the package name (gives a shortened version number). For example:% pkginfo | grep SUNWjman
system SUNWj3man JDK 1.3 man pagesThis note describes how the default Java platform is selected when running the Solaris package installation of the Java 2 SDK.
The Default Java Platform - Up to three versions of the Java platform can be present on a Solaris system (using the default Solaris package installations), but only one can be the "default" Java platform. The default Java platform is defined by the directory that the /usr/java symbolic link points to. To determine the default version of java, run:
The /usr/java symbolic link can change the default Java platform because there are symbolic links in /usr/bin (also known as /bin) that use it. (For example, the /usr/bin/java link refers to /usr/java/bin/java, which is the Java 2 Runtime Environment). Many Java applications run on any of Java platform versions 1.4.2, 1.4.1, 1.3.1, 1.2.2, 1.1, but users and applications might want to be selective about which Java platform installation they use.
Default Installations of Java Platform - The /usr/java symbolic link is initially defined when the Solaris Operating System is installed, as shown in the table below. Notice there are three different default directories into which the Java platform can be installed, each with a different version: version 1.1 is installed in directory /usr/java1.1, version 1.2.2 is installed in directory /usr/java1.2, and versions 1.3.1, 1.4.0, 1.4.1, and 1.4.2 are installed by default in directory /usr/j2se (overwriting each other).
For example, Solaris 9 originally sets the /usr/java link to /usr/j2se, which could hold any 1.3.x or 1.4.x version.
Installing Java 2 SDK 1.4.2 - Installing 1.4.2 on Solaris 9 into directory /usr/j2se (which requires first uninstalling any other version in that directory) automatically makes it the default Java platform. Notice that the /usr/java link does not have to be changed for 1.4.2 to become the default.
On the other hand, installing 1.4.2 on Solaris 7 or 8 will normally not alter the default Java platform. Version 1.4.2 will become the default only if the original default version of the Java platform is missing. For example, on Solaris 8, if version 1.2.2 is present, installing 1.4.2 will not change /usr/java, However, if version 1.2.2 is missing, then installing 1.4.2 will change /usr/java to point to /usr/j2se.
In other words, the Solaris package install of Java 2 SDK 1.4.2 will not change the /usr/java link as long as the original default version of the Java platform is present.
Changing the Default Java Platform - On Solaris 7 and 8, it is possible for root users to make Java 2 SDK 1.4.2 the defult 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 earlier Java applications that have not been tested with 1.4.2. See the online compatibility documentation for information about incompatibilities between Java 2 SDK 1.4.2 and earlier releases:
If you use the Invocation API to launch an application directly rather than using the Java application launcher, be sure to use the correct paths to invoke the Java HotSpot Client Virtual Machine (VM) or Java HotSpot Server VM, as desired. The path within the Java 2 SDK to the Java HotSpot Client VM is:jre/lib/sparc/client/libjvm.so (on SPARC)The path to the Java HotSpot Server VM is:
jre/lib/i386/client/libjvm.so (on x86)jre/lib/sparc/server/libjvm.so (on SPARC)The corresponding locations in the Java 2 Runtime Environment begin with j2re1.4.2 rather than jre. The Exact VM and Classic VM are no longer part of the Java 2 SDK, and existing code that uses the Invocation API to launch an application based on old paths to the Exact or Classic VMs will not work.
jre/lib/sparcv9/server/libjvm.so (on SPARC 64-bit)
jre/lib/i386/server/libjvm.so (on x86)
Solaris Version /usr/java Link
Originally Points to Directory
After Installing 1.4.2
Solaris 7 /usr/java1.1 1.1 1.1 Solaris 8 /usr/java1.2 1.2.2 1.2.2 Solaris 9 /usr/j2se 1.3.1, 1.4.0, 1.4.1 or 1.4.2 1.4.2
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
© 2010, Oracle Corporation and/or its affiliates