JDK 7 Installation on the Oracle Solaris Operating System

See JDK 7 and JRE 7 Installation Guide for general information about installing JDK 7 and JRE 7.

For information on enhancements to JDK 7 that relate to the installer, see Installer Enhancements in JDK 7.

Contents

System Requirements

This version of the JDK is supported on the Oracle Solaris 10 Update 9 or later OS, Oracle Solaris 11 Express OS, and Oracle Solaris 11 OS. For supported processors and browsers, see Oracle JDK 7 and JRE 7 Certified System Configurations.

JDK 7 Installation Instructions for Oracle Solaris 11 using IPS packages

To install JDK 7 on Oracle Solaris 11, install the jdk-7 package:

  1. Make sure the jdk-7 package is available from your IPS publisher.

    $ pkg list -a jdk-7
    
    NAME (PUBLISHER)        VERSION                    IFO
    developer/java/jdk-7    1.7.0.0-0.173.0.0.0.0.0    ---
    

    If you see an "i" in the I column, then the package is already installed.

    This package is available from the solaris publisher at pkg.oracle.com and also from other publisher origins. If you see a message that no such package is found, use the pkg publisher command to check your publisher origin and contact your system administrator or Oracle Support representative.

  2. Make sure you have permission to install IPS packages.

    • Use the profiles command to list the rights profiles that are assigned to you. If you have the Software Installation rights profile, you can use the pfexec command to install and update packages.

      $ pfexec pkg install jdk-7
      

      Other rights profiles also provide installation privilege, such as System Administrator rights profile.

    • Depending on the security policy at your site, you might be able to use the sudo command with your user password to execute a privileged command.

      $ sudo pkg install jdk-7
      
    • Use the roles command to list the roles that are assigned to you. If you have the root role, you can use the su command with the root password to assume the root role.

      # pkg install jdk-7
      

Manual JDK 7 Installation Instructions

The following table lists the options available for downloading the JDK 7 release on the Oracle Solaris platform. The link in the first column takes you to the instructions for that version.

Download File(s) Architecture Who Can Install
jdk-7u<version>-solaris-sparc.tar.gz
jdk-7u<version>-solaris-sparcv9.tar.gz
64-bit SPARC anyone
jdk-7u<version>-solaris-i586.tar.gz
jdk-7u<version>-solaris-x64.tar.gz
64-bit x64, EM64T anyone
jdk-7u<version>-solaris-i586.tar.gz 32-bit x64, EM64T anyone
jdk-7u<version>-solaris-sparc.tar.Z
jdk-7u<version>-solaris-sparcv9.tar.Z
64-bit SPARC root
jdk-7u<version>-solaris-i586.tar.Z
jdk-7u<version>-solaris-x64.tar.Z
64-bit x64, EM64T root
jdk-7u<version>-solaris-i586.tar.Z 32-bit x64, EM64T root

Manual installation can be performed using either of the following:

Note: For any text on this page containing the following notation, you must substitute the appropriate JDK update version number for the notation.

    <version>

For example, if you are installing update JDK 7 update release 1, the following string representing the name of the bundle:

    jdk-7u<version>-solaris-sparc.tar.gz

would become:

    jdk-7u1-solaris-sparc.tar.gz

Note that, as in the preceding example, the <version> number is sometimes preceded with the letter u, for example, 7u1, and sometimes it is preceded with an underscore, for example, jdk1.7.0_01.


Installation of Oracle Solaris Archive Binaries (.tar.gz)

You can install a JDK archive binary in any location that you can write to. It will not displace the system version of the Java platform provided by the Oracle Solaris OS. These instructions install a private version of the JDK.

Installing the JDK on a 64-bit system that allows a 32-bit JVM is a two-step process: first install the 32-bit JDK and then install the additional support for 64-bit operations. The file names are as follows:

On SPARC processors:

    jdk-7u<version>-solaris-sparc.tar.gz     (32-bit)
    jdk-7u<version>-solaris-sparcv9.tar.gz   (64-bit)

On x64/EM64T processors:

    jdk-7u<version>-solaris-i586.tar.gz     (32-bit)
    jdk-7u<version>-solaris-x64.tar.gz      (64-bit)

If you are running a 32-bit version of Oracle Solaris, you only need to download and install the 32-bit version.

1. Download the bundles or bundle, if you are installing only the 32-bit version of Oracle Solaris. Before the file can be downloaded, you must accept the license agreement. The archive binaries can be installed by anyone in any location that you can write to.

The .tar.gz archive file (also called a tarball) is a file that can be simultaneously uncompressed and extracted in one step.

2. Change directory to the location where you would like the JDK to be installed. Move the .tar.gz archive binaries to the current directory.

3. Unpack the tarball and install the JDK.

The following steps can be performed in either order.

On SPARC processors:

    % gzip -dc jdk-7u<version>-solaris-sparc.tar.gz | tar xf -
    % gzip -dc jdk-7u<version>-solaris-sparcv9.tar.gz | tar xf -

On x64/EM64T processors:

    % gzip -dc jdk-7u<version>-solaris-i586.tar.gz | tar xf -
    % gzip -dc jdk-7u<version>-solaris-x64.tar.gz | tar xf -

The JDK is installed in a directory called jdk1.7.0_<version> in the current directory. For example, for the JDK 7 update 1 release, the directory would be named: jdk1.7.0_01.

The supplemental files for 64-bit support are installed in directories named for the machine architecture model, which are added at several locations within the same jdk1.7.0_<version> directory where the 32-bit JDK was installed. For example, on SPARC processors the 64-bit Java VM Library file (libjvm.so) is stored in the jdk1.7.0_<version>/jre/lib/sparcv9/server directory, whereas the version for x64/EM64T is stored in the jdk1.7.0_<version>/jre/lib/amd64/server directory.

The JDK documentation is a separate download. See Java SE Downloads for more information.


Installation of Oracle Solaris SVR4 Packages (.tar.Z)

Use these instructions if you want to use the pkgadd utility to install the JDK. This version allows all users on your system to access Java.

If you do not have root access to your Oracle Solaris system, you can use the Oracle Solaris .tar.gz archive binaries to install a private copy of the JDK.

Installing the JDK on a 64-bit system that allows a 32-bit JVM is a two-step process: first install the 32-bit JDK and then install the additional support for 64-bit operations. The file names are as follows:

On SPARC processors:

    jdk-7u<version>-solaris-sparc.tar.Z      (32-bit)
    jdk-7u<version>-solaris-sparcv9.tar.Z    (64-bit)

On x64/EM64T processors:

    jdk-7u<version>-solaris-i586.tar.Z      (32-bit)
    jdk-7u<version>-solaris-x64.tar.Z       (64-bit)

If you are installing a 32-bit version of Oracle Solaris, you only need to download and install the 32-bit version.

1. Download the bundles or bundle, if you are installing only the 32-bit version of Oracle Solaris. Before the file can be downloaded, you must accept the license agreement.

It is best to create a new directory to save the download bundles to, as the next step will extract several directories and files into this directory.

2. Extract the contents of the 32-bit versions and the 64-bit versions of the compressed tar files:

On SPARC processors:

    % zcat jdk-7u<version>-solaris-sparc.tar.Z | tar xf -
    % zcat jdk-7u<version>-solaris-sparcv9.tar.Z | tar xf -

On x64/EM64T processors:

    % zcat jdk-7u<version>-solaris-i586.tar.Z | tar xf -
    % zcat jdk-7u<version>-solaris-x64.tar.Z | tar xf -

The first command creates a number of directories (SUNWj7rt, SUNWj7dev, SUNWj7cfg, SUNWj7man, and SUNWj7jmp) plus a few files in the current directory.

The second command creates several directories (SUNWj7rtx, SUNWj7dvx, and SUNWj7dmx) in the current directory, which contain 64-bit support for the JDK.

3. Assume the root role. You can use the roles(1) command to determine whether you are able to assume the root role.

4. Uninstall any earlier installation of the JDK packages.

If your machine has an earlier 32-bit or 64-bit version of the JDK installed in the default location (/usr/jdk/jdk1.<major version>.0_<minor version>), you must uninstall it before installing a later version at that 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.

5. Run the pkgadd command to install the 32-bit and 64-bit packages.

    # pkgadd -d . SUNWj7rt SUNWj7dev SUNWj7cfg SUNWj7man                  
    # pkgadd -d . SUNWj7rtx SUNWj7dvx SUNWj7dmx

The first command installs the JDK into /usr/jdk/jdk1.7.0_<version>.

The second command installs the files for 64-bit support into the JDK installation at /usr/jdk/jdk1.7.0_<version>.

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.7.0_<version>, you must uninstall that package before installing this version of the Japanese man pages at that location. Remove that package by running:

    # pkgrm SUNWj7jmp

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

    # pkgadd -d . SUNWj7jmp

7. To save space, delete the tar files and extracted SUNW* directories.

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


Java Plug-in Browser Registration Instructions

You must register the Java Plug-in component with Firefox for the Plug-in to work. Instructions to do this can be found at Manual Installation and Registration of Java Plug-in for Oracle Solaris.

Java Plug-in is supported for the browsers listed in JDK 7 and JRE 7 Certified System Configurations.

If you are using a non-supported browser, check your browser documentation for details on registering the Java Plug-in.


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:


General Installation Notes

The following are general notes about the installation.

Selecting the Default Java Platform

This section describes how the default Java platform is selected when running the Oracle Solaris SVR4 package installation (via the pkgadd command) of the JDK.

The Default Java Platform - Several versions of the Java platform can be present simultaneously on a Oracle Solaris system (using the default Oracle 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 the java executable, 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 Runtime Environment). Many Java applications are compatible with later versions of the Java platform, but some applications might be less compatible.

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.


Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.