How To

Install Java 8u144 JDK/JRE on CentOS, RHEL

Java 8u144 the most recent release, is a fast, secure and reliable programming language as well as computing platform that is used by lots of applications and websites. Java JDK (Java SE Development Kit) is for developers and it includes a complete JRE plus tools for developing, debugging, as well as monitoring Java applications. Furthermore, java is mostly for end-users, and it contains everything required to run Java applications on your system. Before we proceed on how to install java on centos, lets take a quick look at summary of the latest release.

install java centos

Java 8u144 Changelog

  • JDK 8u144 contains IANA time zone data version 2017b
  • java.util.zip.ZipFile.getEntry() now always returns the ZipEntry instance with a / ended entry name for directory entry
  • New Let’s Encrypt certificates added to root CAs
  • JMX Diagnostic improvements
  • Custom HostnameVerifier enables SNI extension
  • Tighter secure checks on processing WSDL files by wsimport tool
  • [See release notes for full explanation]
READ  Install ImageMagick 7.0.7-1 on Ubuntu & CentOS 7

How to install Java 8u144 JDK/JRE on CentOS 7

  • First download and extract the update package

32bit OS

cd /opt/
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/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-i586.tar.gz"
tar xzf jdk-8u144-linux-i586.tar.gz

64bit OS

cd /opt/
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/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz"
tar xzf jdk-8u144-linux-x64.tar.gz
  • Change folder ownership
sudo chown -R root: jdk1.8.0_*
  • Now install Java using the ‘alternatives’ command
sudo alternatives --install /usr/bin/java java /opt/jdk1.8.0_144/bin/java 1
alternatives --config java
  • Also recommended to setup javac and jar paths
----- For JAR -----
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_144/bin/jar 1
alternatives --set jar /opt/jdk1.8.0_144/bin/jar

----- For JAVAC -----
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_144/bin/javac 2xx
alternatives --set javac /opt/jdk1.8.0_144/bin/javac
  • Remove the downloaded package file
sudo rm /opt/jdk-8u144*.tar.gz
  • Next set the Environment Variables
----- For JAVA_HOME -----
export JAVA_HOME=/opt/jdk1.8.0_144

----- For JRE_HOME -----
export JRE_HOME=/opt/jdk1.8.0_144/jre

----- For PATH -----
export PATH=$PATH:/opt/jdk1.8.0_144/bin:/opt/jdk1.8.0_144/jre/bin
  • Check installed Java version
java -version

About the author

Admin

A passionate Linux and Open Source user. In my spare time, I love developing mobile games for fun (You can check my games out iOS Store | Google Play Store) and also spend time contributing to the Linux community.

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz