Home > English > Tutorials > How to install java on centos

How to install java on centos

 

Visit java download page  Click here

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Click on Java download icon

Click on the words Accept License Agreement

 

Select the product that you want to download and click on it. Here you choose Jdk-8-u73-linux-x64.rpm

 

 

Look down at the right corner of your browser, right-click on it and select pause 

 

 

Enter download section, right-click on the paused link and select 'copy link address'

 

Paste the copied link on wget command to download

 

When Download is completed, use ls command and there will come a list named jdk-8u73-linux-x64.rpm?AuthParam=1457880577_..

To solve this problem, you just rename the file extension into .rpm and then you can insatll as usual

Use the command  # mv <old file name> <new file name>

Use the command # rpm -Uvh <file.rpm> to install 

# rpm -Uvh jdk-8u73-linux-x64.rpm

Test the result with the command  # java -version