LOGIN
Sign In or Register
Avatar
Not Registered Yet?

Join Now! It's FREE. Get full access and benefit from this site

Reset My password - Remind Me My username

Username
Password
Remember me

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.

Why scmGalaxy is preferred for DevOps?

What our participants say?