You are on page 1of 5

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
http://www.oracle.com/technetwork/java/javase/certconfig-2095354.html.

Installation Instructions Notation


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 8 update release 1, the following string
representing the name of the bundle:
jdk-8uversion-solaris-sparc.tar.gz

becomes:
jdk-8u1-solaris-sparc.tar.gz

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

JDK 8 Installation Instructions for Oracle Solaris 11 using


IPS packages
To install JDK 8 on Oracle Solaris 11, install the jdk-8 package:
1. Make sure the jdk-8 package is available from your IPS publisher.
2. $ pkg list -a jdk-8
3.
4. NAME (PUBLISHER)
5. developer/java/jdk-8

VERSION
1.8.0.0-0.183.0.0.0.0.0

IFO
---

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.

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


o 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.
o

$ pfexec pkg install jdk-8

Other rights profiles also provide installation privilege, such as System


Administrator rights profile.
o 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.
o

$ sudo pkg install jdk-8

o 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.
o

# pkg install jdk-8

Manual JDK 8 Installation Instructions


The following table lists the options available for downloading the JDK 8 release on the Oracle
Solaris platform.
Download File(s)

Architecture

Who Can Install

jdk-8uversion-solaris-sparcv9.tar.gz

64-bit SPARC

anyone

jdk-8uversion-solaris-x64.tar.gz

64-bit x64, EM64T

anyone

jdk-8uversion-solaris-sparcv9.tar.Z

64-bit SPARC

root

jdk-8uversion-solaris-x64.tar.Z

64-bit x64, EM64T

root

Installation instructions are by file type:

files: See "Installation of Oracle Solaris Archive Binaries (.tar.gz)". This


technique allows you to install a private version of the JDK for the current user into any
location, without affecting other JDK installations. However, it may involve manual steps
to get some of the features to work (for example, the -version:release option of the
java command which allows you to specify the release to be used to run the specified
class requires the correct path to the JDK release under /usr/jdk).
.tar.gz

files: See "Installation of Oracle Solaris SVR4 Packages (.tar.Z)". This


technique allows you to perform a system-wide installation of the JDK for all users, and
requires root access. Note that this is a legacy install option. See "JDK 8 Installation
Instructions for Oracle Solaris 11 using IPS packages" for the recommended approach.
.tar.Z

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.
Follow these steps to install:
1. Download the bundle.
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 want the JDK to be installed.
3. Move the .tar.gz archive binaries to the current directory.
4. Unpack the tarball and install the JDK:
o On SPARC processors:
o

% gzip -dc jdk-8uversion-solaris-sparcv9.tar.gz | tar xf -

o On x64/EM64T processors:
o

% gzip -dc jdk-8uversion-solaris-x64.tar.gz | tar xf -

The JDK is installed in a directory called jdk1.8.0_version in the current directory. For
example, for the JDK 8 update 1 release, the directory would be named: jdk1.8.0_01.
The JDK documentation is a separate download. See
http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs.

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


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

If you do not have root access to your Oracle Solaris system, see "JDK 8 Installation Instructions
for Oracle Solaris 11 using IPS packages" to install a private copy of the JDK.
Follow these steps to install:
1. Create a new directory to save the download bundle in, and change to that directory.
2. Download the bundle.
Before the file can be downloaded, you must accept the license agreement.
3. Extract the contents of the compressed tar files:
o On SPARC processors:
o

% zcat jdk-8uversion-solaris-sparcv9.tar.Z | tar xf -

o On x64/EM64T processors:
o

% zcat jdk-8uversion-solaris-x64.tar.Z | tar xf -

The first command creates a number of directories (SUNWj8rt, SUNWj8dev, SUNWj8cfg,


SUNWj8man, and SUNWj8jmp) plus a few files in the current directory.
4. Assume the root role.
You can use the roles(1) command to determine whether you are able to assume the
root role.
5. 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
details, see "Selecting the Default Java Platform".
6. Run the pkgadd command to install the packages.
7. # pkgadd -d . SUNWj8rt SUNWj8dev SUNWj8cfg SUNWj8man

The command installs the JDK into /usr/jdk/jdk1.8.0_version.


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

8. Japanese users: Install man pages.


If your machine has an earlier version of the Japanese man pages already installed in
usr/jdk/jdk1.8.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 SUNWj8jmp

Then run the pkgadd command to install the new Japanese man page package.
# pkgadd -d . SUNWj8jmp

9. To save space, delete the tar files and extracted SUNW* directories.
10. Exit the root role.
No need to reboot.

Selecting the Default Java Platform


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

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.

You might also like