This topic includes the following sections:
System Requirements for Installing the JDK on Oracle Solaris
JDK 12 is supported on Oracle Solaris SPARC (64-bit), version 11 or later.
For supported processors and browsers, see Oracle JDK Certified Systems Configurations.
JDK Installation Instruction Notation for Oracle Solaris
Instructions for installing the JDK contain the
interim.update.patch notation that represents the update version number.
For JDK installation instructions that contain the notation
interim.update.patch, substitute the appropriate update version number. For example, if you are installing JDK 12, Interim 0, Update 0, and Patch 0, then the following string represents the name of the bundle:
This string becomes:
Installation of JDK on Oracle Solaris from Archive Binaries
You can install JDK 12 on an Oracle Solaris platform from archive binaries (
.tar.gz) and Image Packaging System (IPS), which is the Solaris Update Repository.
Architecture: 64-bit SPARC
Who Can Install: Anyone
The installation instructions for using these files are organized by the
.tar.gz file type. This technique allows you to install a private version of the JDK for the current user in any location without affecting other JDK installations. However, it involves manual steps to get some features to work.
Note:See Installing JDK on Oracle Solaris 11 from IPS Packages for the recommended approach.
Installing JDK on Oracle Solaris from Archive BinariesYou can install the JDK archive binary in any location that you can write to. It does not replace the system version of the Java platform provided by the Oracle Solaris OS.
.tar.gz) on Oracle Solaris:
- Download the bundle.
Ensure that you accept the license agreement before downloading the file. The archive binaries can be installed by anyone in any location that you can write to.
You can simultaneously uncompress and extract the
.tar.gzarchive file (also called a tarball) in one step.
- Change the directory to the location where you want the JDK to be installed.
- Move the
.tar.gzarchive binaries to the current directory.
- Unpack the tarball and install the JDK on SPARC processor:
$ gzip -dc jdk-12.interim.update.patch_solaris-sparcv9_bin.tar.gz | tar xf -
The JDK is installed in a directory called
jdk–12.interim.update.patchin the current directory. For example, the directory for the JDK 12 Interim 0, Update 0, and Patch 0 is named:
Installing JDK on Oracle Solaris 11 from IPS Packages
You can install JDK 12 on Oracle Solaris by using an IPS package.
- Ensure that the
jdk-12.interim.update.patchpackage is available from your IPS publisher.For example:
$ pkg list -a jdk-12.interim.update.patch
Name (Publisher) Version IFO
Name: the name of the package. If the publisher from which the package is installed (or available) is not the first in the publisher search order, then the publisher name is listed in parentheses after the package name.
Version: the release and branch versions of the package.
IFO:the set of flags that display the status of the package:
iin the I column implies that the package is installed.
fin the F column implies that the package is frozen.
oin the O column implies that the package is obsolete.
rin the O column implies that the package has been renamed.
This package is available from the Oracle Solaris publisher at
pkg.oracle.comand also from other publisher origins. If you see a message that no such package is found, then use the
pkg publishercommand to check your publisher origin and contact your system administrator or Oracle Support representative.
- Ensure that you have permission to install IPS packages:
profilescommand to list the rights profiles that are assigned to you. If you have the Software Installation rights profile, then you can use the
pfexeccommand to install and update packages.
$ pfexec pkg install jdk-12.interim.update.patch
Other rights profiles also provide installation privileges, such as the System Administrator rights profile.
Depending on the security policy at your site, you might be able to use the
sudocommand with your user password to execute a privileged command:
$ sudo pkg install jdk-12.interim.update.patch
Use the roles command to list the roles that are assigned to you. If you have the root role, you can use the
sucommand with the root password to assume the root role:
$ pkg install jdk-12.interim.update.patch
Note:The JDK 12 installation from the SVR4 package (through the
pkgaddcommand) is not supported. Install JDK 12 using the IPS package.
Specifying the Default Java Platform
If there are multiple versions of Java installed on the same image, then you can specify the default or preferred Java version using
Mediator contains a set of links to different implementations of an application, where every link has the same mediator name and link path, but different target link paths.
View the Current Default Version
pkg mediatorcommand to display all mediators in the image and the current default Java version.
$ /usr/bin/pkg mediator | grep java
Set the Default Java VersionUse the
pkg set-mediatorcommand to set Java 12 as the default or preferred version.
$ usr/bin/pkg set-mediator -V 12.interim.update.patch java