3 Installation of the JDK on Oracle Solaris

This topic includes the following sections:

System Requirements for Installing the JDK on Oracle Solaris

JDK 17 is supported on Oracle Solaris SPARC (64-bit), version 11.4 or later.

For supported processors and browsers, see Oracle JDK Certified Systems Configurations.

Note:

JDK 17 for Solaris does not support the following:
  • Z Garbage Collector (ZGC)
  • Application Class-Data Sharing (AppCDS)
  • JVM Compiler Interface (JVMCI)
  • Headful graphics

In addition, JDK 17 for Solaris does not include the following:

  • jpackage, jlink, jimage, or jmod tools
  • JMOD files for use with the jlink tool

The Java 2D API is supported for printing purposes.

JDK Installation Instruction Notation for Oracle Solaris

For JDK installation instructions that contain the notation interim.update.patch (see Version-String Format), substitute the appropriate update version number. For example, if you are installing JDK 17, Interim 0, Update 19, and Patch 0, then the following string represents the name of the bundle:

jdk-17.interim.update.patch_solaris-sparcv9_bin.tar.gz

This string becomes:

jdk-17.0.19_solaris-sparcv9_bin.tar.gz

Note:

Trailing zeroes are truncated from interim.update.patch; see Version-String Format.

Installation of JDK on Oracle Solaris from Archive Binaries

You can install JDK 17 on Oracle Solaris from archive binaries (.tar.gz).

To install the JDK from an archive binary on Oracle Solaris:
  1. Download the archive binary for Oracle Solaris from Java Downloads. Its file name is jdk-17.interim.update.patch_solaris-sparcv9_bin.tar.gz.

    Ensure that you accept the license agreement before downloading the file.

    You 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 operating system.

    You can simultaneously uncompress and extract the .tar.gz archive binary (also called a tarball) in one step.

  2. Change the directory to the location where you want the JDK to be installed.
  3. Move the .tar.gz archive binary to the current directory.
  4. Install the JDK by unpacking the archive binary:
    $ gzip -dc jdk-17.interim.update.patch_solaris-sparcv9_bin.tar.gz | tar xf -

    The JDK is installed in a directory called jdk–17.interim.update.patch in the current directory. For example, the directory for JDK 17 Interim 0, Update 0, and Patch 0 is named jdk-17.

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

Use pkg mediator command to display all mediators in the image and the current default Java version.
$ /usr/bin/pkg mediator | grep java

Set the Default Java Version

Use the pkg set-mediator command to set Java 17 as the default or preferred version.
$ usr/bin/pkg set-mediator -V 17.interim.update.patch java