This tutorial will show how to install Java 9 on CentOS/RHEL and set up the necessary environment variables for application development.
Visit this link then accept the Oracle’s license agreement. After that, select the RPM package for your Linux/CentOS/RHEL and copy the download link, it should be something like
jdk-9.0.1_linux-x64_bin.rpmhttp://download.oracle.com/otn-pub/java/jdk/9.0.1+11/
First, type the following command on CentOS/RHEL terminal, please note that you should append the copied link between double quotes at the end of the command. Wait until the download completes.
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.rpm"
After that, run the following command in order to install the downloaded rpm package:
sudo yum install jdk-9.0.1_linux-x64_bin.rpm
After the installation is done, you may delete the downloaded rpm package:
rm jdk-9.0.1_linux-x64_bin.rpm
The installation through the above steps often automatically performs the necessary changes on the environment for Java 9 development on Linux distribuitions, so unlike Windows, you shouldn’t need to manually set up any environment variables.
So, let’s validate the installation with the following commands:
java -version java version "9.0.1" Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
javac -version javac 9.0.1
I hope it helps.
Cya!
This guide will show you how to create a Python function decorator with a few…
This guide will show you how to fix the error Got permission denied while trying…
This guide will show you how to create a Python virtual environment on Intellij IDEA…
This tutorial will quickly show you how to to find and kill processes on Linux,…
This guide shows a possible solution for Python error Relocation R_X86_64_PC32 against symbol can not…
I condensed below a cheat sheet of Kubernetes useful commands. I will keep updating this…