Complete guide of Java Installation in Linux

JDK 8

 

Debian, Ubuntu, etc.
 
On the command line, type:
 
$ sudo apt-get install openjdk-8-jre
The openjdk-8-jre package contains just the Java Runtime Environment. 
 
$ sudo apt-get install openjdk-8-jdk
If you want to develop Java programs then please install the openjdk-8-jdk package.
 
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
 
On the command line, type:
 
The java-1.8.0-openjdk package contains just the Java Runtime Environment.
$ su -c "yum install java-1.8.0-openjdk"
 
If you want to develop Java programs then install the java-1.8.0-openjdk-devel package.
$ su -c "yum install java-1.8.0-openjdk-devel "
 
RPM using wget
$ wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.rpm
 
TAR GZ:
$ wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz
 
RPM using curl:
$ curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.rpm > jdk-8u92-linux-x64.rpm

 

JDK 7

 
Debian, Ubuntu, etc.
 
On the command line, type:
 
$ sudo apt-get install openjdk-7-jre
The openjdk-7-jre package contains just the Java Runtime Environment. 
 
$ sudo apt-get install openjdk-7-jdk
If you want to develop Java programs then install the openjdk-7-jdk package.
 
Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.
 
On the command line, type:
 
$ su -c "yum install java-1.7.0-openjdk"
The java-1.7.0-openjdk package contains just the Java Runtime Environment. 
 
$ su -c "yum install java-1.7.0-openjdk-devel"
If you want to develop Java programs then install the java-1.7.0-openjdk-devel package.
 
Wget
get --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"
 
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
 
RPM using curl:
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.
Rate this item
(0 votes)
Rajesh Kumar

.

Total, Over 12 years of extensive experience in the Software Configuration Management domain having depth knowledge of DevOps, Continuous Integration and Delivery, Configuration Management, Build and Installer, Release Management and Application Management.

What corporate management say about us?

Rajesh is very knowledgeable instructor he has a good exposure on real time issue and case studies he is experienced in large environment issue and challenges. I really liked how Rajesh used a lot of examples so that concepts were more easily understood, I like the examples that Rajesh give to help us remember things…they are usually real scenario, real life problems that we encounter frequently. <br /> He is well organised in terms of study materiel that you can refer anytime after you complete your course. His blogs are crisp and has to the point key content that he discussed during session to remember if you refer them remotely.

Gaurav Vishnoi
I am having 11+ years of experience in java, due to increasing complexity of system and environment I opted for this tanning and find it very useful., Noida
Sep 02, 2016

Authors

Login