<img alt="" src="https://secure.leadforensics.com/150446.png " style="display:none;">

Installation of a JDK1.8 on Linux

Ajinkya Falke Oct 17, 2016

Linux JDK1.8 Ubuntu CentOS

We use JVM (Java Virtual Machine) for different tools in today’s technological world. Also, there are different versions of JVM released till now. JDK1.8.0 is the latest version of Java which is required by many software tools.

Requirements for JDK1.8

Both the JDK and JRE require a minimum a Pentium 2 266 MHz processor.

JDK1.8.0 runs on both 32bit and 64bit operating system with minimum of 128mb of RAM and free space of least 181 MB.

The installation Steps of JDK8 and JRE8 in both Ubuntu and CentOS starts here:


To install JDK1.8 using this steps you will need:

  • One Ubuntu server/CentOS.
  • A sudo non-root user, which you can set up by following the Ubuntu 16.04 / CentOS 6/7 initial setup guide.

The following steps will guide you with JDK/JRE 8 installation in Ubuntu 16.04:

The best way to install is to use the version packed with Ubuntu. It will install OpenJDK 8, the latest version of JDK.

Start with updating package index:

  • $ sudo apt-get update               

Now install Java using the following command:

  • $ sudo apt-get install default-jre

The JDK does contain the JRE, so there are no disadvantages if you install the JDK instead of the JRE, except for the larger file size.

This command will install JDK:

  • $ sudo apt-get install default-jdk

The below given Steps will guide you to install JDK/JRE 8 in Centos 6/7:

The first step is to change to your home directory:

  • cd ~

Next Step is to download Oracle Java 8 JRE and RPM with below commands:

  • wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \


  • wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie"


Then after downloading, install the RPM with yum command:

  • yum localinstall jre-8u60-linux-x64.rpm
  • yum localinstall jdk-8u60-linux-x64.rpm

The Java installation will be at location /usr/java/jdk1.8.0_60/jre/bin/java, and linked from /usr/bin/java.

After installing you can delete the archive file that you downloaded earlier:

  • rm ~/jre-8u60-linux-x64.rpm
  • rm ~/jdk-8u60-linux-x64.rpmb

To check Java installation, use the following command:

  • java -version

This way you can install JDK1.8 on Linux. You can ask your questions in the comment section. I would love to answer them.

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.