Solaris Operating System Installation (32-bit)


  JDK Documentation

Contents

System Requirements
JDK Installation Instructions
    Installation of Solaris Packages
    Installation of Self-Extracting Binary
Java Plugin Browser Registration Instructions
Java Web Start Installation Notes
General Installation Notes
    Solaris Package Install - Selecting the Default Java Platform
    Location of Java VM Library Files (libjvm.so)

System Requirements

This version of the JDK is supported on the Solaris 8, Solaris 9, Solaris 10, and Solaris 11 operating systems. For supported processors, desktop managers, and browsers, see System Configurations.

Prior to installing the JDK, you should ensure that you have installed the full set of required patches needed for support of this release. See My Oracle Support website for recommended and required patches.

See also Solaris Font Package Requirements for information about which font packages should be on your system.

JDK Installation Instructions

Installing the JDK automatically installs the Java Plugin and Java Web Start. Note that the Java Plugin needs to be registered with the browser. Instructions for doing so can be found below at Java Plugin Browser Registration Instructions.

To install the 32-bit JDK, follow the installation instructions below.

To install the 64-bit JDK on a SPARC, x64, or EM64T platform, you must follow a two-step procedure: Install the 32-bit JDK using the installation instructions below, and also install the supplemental support for 64-bit operation by following the 64-bit Installation Instructions.

Install formats - The JDK is available in two installation formats.

  • Solaris Packages - A .tar.Z file containing Solaris SUNW* packages to be installed with the pkgadd utility. If you are using this bundle, see Installation of Solaris Packages below.

     

  • Self-extracting Binary File - This file can be used to install the JDK in a location chosen by the user. This file can be installed by anyone (not only root users), and it can be installed in any location. It will not displace the system version of the Java platform suppled by the Solaris Operating System (unless you intentially install it in the same location as the system's Java platform, which requires you to be root user). If you are using this file, see Installation of Self-Extracting Binary below.

 

Note: For any text on this page containing the following notation, you must substitute the appropriate JDK update version number (such as "_01") for the notation.
       
                                 <update>               
       
            
For example, if you are installing update 1.6.0_01, the following command:
       
               chmod +x jdk-6                  <update>-solaris-sparc.sh               
       
            
would become:
       
               chmod +x jdk-6u1-solaris-sparc.sh
       
            

Installation of Solaris Packages

Use these instructions to install the Java packages for Solaris. This is the recommended method for installing Java on Solaris as it allows all users on your system to access Java. If you are a tool developer and need to distribute Java with your product or if you do not have root access to your Solaris system, you can use the self-extracting bundle to install a private copy of the JDK.

1. Download and check the file size to ensure that you have downloaded the full, uncorrupted software bundle.

It's best to create a new directory to save the download bundle to, as the next step will extract several directories and files into this directory. The directory can be anywhere 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 jdk-6 <update> -solaris-sparc.tar.Z | tar -xf -

On x86/x64/EM64T processors:
zcat jdk-6 <update> -solaris-i586.tar.Z | tar -xf -

This creates several directories ( SUNWj6rt, SUNWj6dev, SUNWj6cfg, SUNWj6man, SUNWj6dmo, and SUNWj6jmp) plus a few files in the current directory.

3. Become root by running su and entering the super-user password.

4. Uninstall any earlier installation of JDK packages.

If your machine has an earlier installation of this version of the JDK in the default location ( /usr/jdk/jdk1.6.0), you must remove it before installing this version at the same location.

You can skip this step if you intend to install the JDK in a non-default location. For more details, see Selecting the Default Java Platform.

To uninstall the Solaris packages for this version of the JDK, remove them by running:

On all processors:
pkgrm SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo

 

5. Run the pkgadd command to install the packages.

 

On all processors:
pkgadd -d . SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo

This command installs the JDK into /usr/jdk/jdk1.6.0. This version does not automatically become the default Java platform on Solaris 9 or earlier (unless there was no default), but does become the default on Solaris 10. If you want 6.0 to be the default on Solaris 8 or 9, follow the instructions at Default Installations of Java Platform.

See the pkgadd(1) and admin(4) man pages for information on installing the JDK in a non-default location.

 

6. For Japanese users: Install man pages.

If your machine has an earlier version of the Japanese man pages already installed in /usr/jdk/jdk1.6.0, you must remove that package before installing this version of the Japanese man pages at that location. Remove that package by running:

On all processors:
pkgrm SUNWj6jmp

Then run the pkgadd command to install the new Japanese man page package:

On all processors:
pkgadd -d . SUNWj6jmp

 

7. Delete the tar files and extracted SUNW* directories.

8. Exit the root shell. No need to reboot.

Installation of Self-Extracting Binary

Use these instructions if you want to use the self-extracting binary file to install the JDK. If you want to install Solaris packages comprising the JDK, use Installation of Solaris Packages.

1. Download the self-extracting binary and 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 JDK.

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. Make sure that execute permissions are set on the self-extracting binary:

On SPARC processors:
chmod +x jdk-6 <update> -solaris-sparc.sh

On x86/x64/EM64T processors:
chmod +x jdk-6 <update> -solaris-i586.sh

3. Change directory to the location where you would like the files to be installed.

The next step installs the JDK into the current directory.
4. Run the self-extracting binary.
Execute the downloaded file with the path prepended 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:
./jdk-6 <update> -solaris-sparc.sh

On x86/x64/EM64T processors:
./jdk-6 <update> -solaris-i586.sh

The binary code license is displayed, and you are prompted to agree to its terms.

The JDK files are installed in a directory called jdk1.6.0 <update> in the current directory. Follow this link to see its directory structure. The JDK documentation is a separate download.

Note about System Preferences - When run by a non-root user, the installation is considered a "private" or non-system install. During a private install, the installation script configures Java such that the backing store for the java.util.prefs package is created inside the JRE's installation directory. If the JRE is installed this way on a network-mounted drive, all Java applications, libraries, and preferences can be exported for sharing, so that the same version of the Java runtime environment and preferences are available to other machines.

As an alternative, when root users run the installation script, preferences are stored in the /etc directory. This is similar to installing the Java packages for Solaris, and this installation is "public" or system specific. Installing Java in this manner allows all versions of Java that support the java.util.prefs package to share the same set of preferences. In other words, in a public/system install, preferences set by a user running the JRE are available when the system is upgraded.

See the Preferences API documentation for more information about preferences in the Java platform.

Java Plugin Browser Registration Instructions

You must register the Java Plugin component with Netscape or Mozilla for the Plugin to work. Instructions to do this can be found at Manual Java Plugin Registration for Solaris.

Java Plugin is supported for Netscape 7.x, plus Mozilla 1.x and higher on Solaris 8, 9, and 10. Java Plugin also supports Netscape 4.x, but only on Solaris 8. Java Plugin no longer works with Netscape 6.x. Java Plugin may work with other non-supported browsers. If you are using a non-supported browser, check your browser documentation for details on registering the Java Plugin.

Also see documentation on the Java Plugin component.

Java Web Start Installation Notes

This JDK release includes Java Web Start; Java Web Start is automatically installed with the JDK. But note the following:

  • Compatibility: The release of Java Web Start that comes with this JDK/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 javaws executable file in your Java Web Start directory. Also note that, due to a problem with the JavaScript in Netscape 6.x/7.x, you must use the non-JavaScript version of the demos page.
  • pkgadd utility use: (1) If you use the pkgadd utility to install the Solaris packages for JDK or JRE, a symbolic link for /j2se/jre/javaws/javaws is 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/.mailcap file so that it is identical to /etc/.mailcap. If you want the older version of Java Web Start to run, do not edit $HOME/.mailcap.

General Installation Notes

The following are general notes about the installation.

Solaris Package Install - Selecting the Default Java Platform

This note describes how the default Java platform is selected when running the Solaris package installation (not the self-extracting binary) of the JDK. It also describes how to change that default.

The Default Java Platform - Several versions of the Java platform can be present simultaneously 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:

/usr/java/bin/java -fullversion

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 are compatible with later versions of the Java platform, but some applications might be less compatible.

Default Installations of Java Platform - When the Solaris Operating System is installed, the /usr/java symbolic link initially points to the directory shown in the second column of the table below.

 

Solaris Version /usr/java Link
Originally Points to Directory
Which Can Hold
Java Platform
Default Platform
After Installation
Solaris 8 /usr/java1.2 1.2.2 1.2.2 (unchanged) *
Solaris 9 /usr/j2se 1.3.1, 1.4.0, 1.4.1or 1.4.2 1.3.1, 1.4.0, 1.4.1 or 1.4.2 (unchanged) *
Solaris 10 /usr/jdk/jdk1.5 5.0 or 6 5.0 or 6

* The only way that this version of the JDK will make itself the default on Solaris 9 or earlier is if no other default exists.

For example, on Solaris 8, the /usr/java symbolic link originally points to directory /usr/java1.2 which holds version 1.2.2. On Solaris 9, the /usr/java symbolic link originally points to directory /usr/j2se, which can hold any one of versions 1.3.1, 1.4.0, 1.4.1 or 1.4.2, depending on the latest Java version you have installed. On Solaris 10, the /usr/java symbolic link originally points to directory /usr/jdk/jdk1.5.0.

Note that installing this version of the JDK on Solaris 8 or 9 will normally not alter the default Java platform. This version will become the default only if no other default exists. For example, if /usr/java does not point to a version of Java, installing this version of the JDK will make /usr/java point to /usr/jdk/jdk1.6.0.

Making this version of the JDK the default - On Solaris 8 and 9, it is possible for root users to make this version of the JDK the default Java platform by modifying the /usr/java symbolic link to point to /usr/jdk/jdk1.6.0. On Solaris 9, a root user would modify the /usr/j2se symbolic link to point to the same directory. However, changing the symbolic link in this manner may cause problems for some earlier Java applications that have not been tested with this version. For information about incompatibilities between this version of the JDK and earlier releases, see Compatibility with Previous Releases.

PATH Setting - The default Java is linked through /usr/bin, such as /usr/bin/java. If this is in the path before another version of Java is in the path, then that will be the version of Java run from the command line or from any other tool that uses the PATH environment variable to locate Java.

 

Location of Java VM Library Files ( libjvm.so)

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 JDK to the Java HotSpot Client VM is:
jre/lib/sparc/client/libjvm.so (on SPARC)
jre/lib/i386/client/libjvm.so (on x86)
The path to the Java HotSpot Server VM is:
jre/lib/sparc/server/libjvm.so (on SPARC)
jre/lib/sparcv9/server/libjvm.so (on SPARC 64-bit)
jre/lib/i386/server/libjvm.so (on x86)
jre/lib/x64/server/libjvm.so (on x64/EM64T)

Corresponding locations in the Java Runtime Environment begin with jre1.6.0 rather than jre.

Note, the Exact VM and Classic VM are no longer part of the JDK, 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.