Shane Bishop
Shane Bishop

Reputation: 4802

How to install JDK 11 on Solaris 11 AMD64

Does JDK 11 support Solaris 11 AMD64? According to Installation of JDK on Oracle Solaris, JDK 11 is at least supported for Solaris 11 sparc, but the page does not explicitly say it is not supported for Solaris 11 AMD64.

Assuming the answer to the above question is yes, how can I install JDK 11 on Solaris 11 AMD64?

I know the page I linked to recommends installing from IPS packages, but although I looked at the details here, I couldn't find anything that I could provide to pkg install that would work. All the commands I tried failed - for example:

# pkg install jdk-11.0.1.0
Failed to set locale: unsupported locale setting.  Falling back to C.
pkg: Unable to set locale 'en_US.UTF-8'; locale package may be broken or
not installed.  Reverting to C locale.

pkg install: The following pattern(s) did not match any allowable packages.  Try
using a different matching pattern, or refreshing publisher information:

        jdk-11.0.1.0

I confirmed that I have pkg.oracle.com as a publisher origin, and the page I link to above says that this package is available through this publisher:

# pkg publisher
Failed to set locale: unsupported locale setting.  Falling back to C.
pkg: Unable to set locale 'en_US.UTF-8'; locale package may be broken or
not installed.  Reverting to C locale.
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release/

Upvotes: 2

Views: 2239

Answers (1)

Basil Bourque
Basil Bourque

Reputation: 339855

tl;dr

If you want Java 11 on Solaris for AMD64, I found a release from Azul Systems but not from Oracle.

How to install? See this.

Details

Oracle Corp as a vendor

👉 Regarding Oracle’s Oracle JDK product, for Java 11, I see only sparcv9 supported, not AMD64 (x86-64, x64).

If you click the Java 8 tab on that same page, you'll see that in Java 8 Oracle did indeed support Solaris on both AMD64 and SPARC. But apparently Oracle’s support continued into Java 11 only for SPARC, not AMD64.

Of course, for a definitive answer you should contact an Oracle salesperson or their support staff.

Other vendors

The Oracle JDK product from Oracle is but one of many JDK products available from several vendors.

Most implementations of Java are based on the source code provided by the OpenJDK project.

As of Java 14, the Solaris ports were deprecated in the OpenJDK project. These included Solaris/SPARC, Solaris/x64, and Linux/SPARC ports. Finally removed in Java 15.

Some vendors may maintain releases. Some quick checks on my part just now reveal:

  • 👉 Azul Systems provides at no cost builds of their Zulu JDK product for Solaris on x86 64-bit as well as SPARC 64-bit, for both Java 8 and Java 11. Paid support is available.
  • Adoptium provides Java 8 for both x64 and sparcv9 in their Eclipse Temurin product, but no further Solaris support in Java 11+.

In addition to Azul Systems and Adoptium, you may want to check with other JDK vendors such as IBM, Red Hat, Bellsoft, SAP, Microsoft, Amazon, Oracle, Pivotal, etc.

As for "how to install", I quote the instructions copied from the Azul Systems site for their Zulu product, page titled Install Azul Zulu on Solaris:

Install Azul Zulu on Solaris
Azul provides binary .zip packages for the supported Solaris versions. You can download the package for your system from the Downloads page.
Extract the package content into a folder.

 
unzip <package>.zip
The command creates a folder named after the package but without the .zip extension. This is your Azul Zulu installation folder.

To verify that the package was extracted correctly, run

 
<installation_folder>/bin/java -version
Example output:

 
$ zulu8.52.0.23-ca-jdk8.0.282-solaris/bin/java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (Zulu 8.52.0.23-CA-solaris) (build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (Zulu 8.52.0.23-CA-solaris) (build 25.282-b08, mixed mode)
(Optional) Add <installation_folder>/bin to your PATH environment variable, so that you can execute java from any directory without specifying the full path.

 
export PATH=<installation_folder>/bin:$PATH

Upvotes: 3

Related Questions