Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Jdk in centos

Tags:

java

centos

I am new to centos and linux systems. I have downloaded both jdk-6u35-linux-x64.bin and .rpm.bin but neither of them is giving me .rpm file to install nor .bin is executing by itself

i have tried commands like ./ jdk..... .bin and gunzip for .tar files

Can anyone kindly tell me few steps to install jdk1.6 in centos 6.5(Final) 64 bit machine with suitable download link

like image 941
NavinRaj Pandey Avatar asked Jan 03 '14 10:01

NavinRaj Pandey


People also ask

Is java installed on CentOS?

OpenJDK, the open-source implementation of the Java Platform, is the default Java development and runtime in CentOS 7. The installation is simple and straightforward.


Video Answer


1 Answers

There are JDK versions available from the base CentOS repositories. Depending on your version of CentOS, and the JDK you want to install, the following as root should give you what you want:

OpenJDK Runtime Environment (Java SE 6)

yum install java-1.6.0-openjdk 

OpenJDK Runtime Environment (Java SE 7)

yum install java-1.7.0-openjdk 

OpenJDK Development Environment (Java SE 7)

yum install java-1.7.0-openjdk-devel 

OpenJDK Development Environment (Java SE 6)

yum install java-1.6.0-openjdk-devel 

Update for Java 8

In CentOS 6.6 or later, Java 8 is available. Similar to 6 and 7 above, the packages are as follows:

OpenJDK Runtime Environment (Java SE 8)

yum install java-1.8.0-openjdk 

OpenJDK Development Environment (Java SE 8)

yum install java-1.8.0-openjdk-devel 

There's also a 'headless' JRE package that is the same as the above JRE, except it doesn't contain audio/video support. This can be used for a slightly more minimal installation:

OpenJDK Runtime Environment - Headless (Java SE 8)

yum install java-1.8.0-openjdk-headless 
like image 172
grdryn Avatar answered Oct 05 '22 21:10

grdryn