Download, Install and Configure JDK 8 & JRE 8
Platfrom – Debian & Ubuntu
#JRE8 - Package contains just the Java Runtime Environment 8 $ sudo apt-get install openjdk-8-jre #JKD8 - Package contains just the Java Developement Environment 8 $ sudo apt-get install openjdk-8-jdk
Platfrom – Fedora, Oracle Linux, Red Hat Enterprise Linux, etc
#JRE8 - Package contains just the Java Runtime Environment 8 $ su -c “yum install java-1.8.0-openjdk” #JKD8 - Package contains just the Java Developement Environment 8 $ su -c "yum install java-1.8.0-openjdk-devel" $ 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/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.rpm" $ wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm > jdk-8u112-linux-x64.rpm
Platfrom – All platforms of Linux, Windows and Mac in Tar ball format
$ wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz $ 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/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz" $ wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
How to set JAVA in Linux System?
$ export JAVA_HOME=/opt/jdk1.8.0_144/ $ export PATH=/opt/jdk1.8.0_144/bin:$PATH;
Download, Install and Configure JDK 7 & JRE 7
Platfrom – Debian & Ubuntu
#JRE7 - Package contains just the Java Runtime Environment 7 $ sudo apt-get install openjdk-7-jre #JKD7 - Package contains just the Java Developement Environment 7 $ sudo apt-get install openjdk-7-jdk
Platfrom – Fedora, Oracle Linux, Red Hat Enterprise Linux, etc
$ su -c “yum install java-1.7.0-openjdk” $ su -c “yum install java-1.7.0-openjdk-devel”
Platfrom – All platforms of Linux, Windows and Mac in Tar ball format
wget –no-cookies –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com” “http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz” wget –no-check-certificate –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz curl -v -j -k -L -H “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm > jdk-7u79-linux-x64.rpm
JDK 6
Debian, Ubuntu, etc.
On the command line, type:
$ sudo apt-get install openjdk-6-jre
The openjdk-6-jre package contains just the Java Runtime Environment.
$ sudo apt-get install openjdk-6-jdk
If you want to develop Java programs then install the openjdk-6-jdk package.
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
On the command line, type:
$ su -c “yum install java-1.6.0-openjdk”
The java-1.6.0-openjdk package contains just the Java Runtime Environment.
$ su -c “yum install java-1.6.0-openjdk-devel”
If you want to develop Java programs then install the java-1.6.0-openjdk-devel package.
- Use of runtime variables to save into another variable using register in Ansible - September 6, 2018
- Ansible & Ansible Tower Variable Precedence Hierarchy - September 6, 2018
- How to use template in Ansible? - September 6, 2018
This is a very helpful and detailed guide on Java installation in Linux. It clearly explains how to install and set up Java on different Linux distributions, which is essential for developers who need a consistent and reliable environment for building and running Java applications. The step-by-step instructions, including verifying the installation and setting environment variables, make it easy even for beginners to follow. Understanding Java setup on Linux is crucial because many enterprise and cloud applications run on Linux servers, and this guide provides a solid foundation for anyone preparing their system for development or deployment.