Install Java Ubuntu

Install Java Ubuntu

Here you will see how to install Java on your newly installed Ubuntu. First update the package index using below command: 

sudo apt-get update

Install Java Ubuntu

  • Now check if java is already install or not using command:

java -version

Install Java Ubuntu

  •  As you see above java is not installed yet so use below command to install JRE:

sudo apt-get install default-jre

Install Java Ubuntu

Install Java Ubuntu

  • To check where it is installed use command “which java” or “type java” as below:

Install Java Ubuntu

  •  To install JDK please use command “sudo apt-get install default-jdk”

Install Java Ubuntu

  •  If you it installed successfully you will see below:

Install Java Ubuntu

It was everything to install java. Below are other optional choice if you want to install:

  • sudo apt-get install oracle-java8-installer — Install Oracle JDK 8
  • sudo apt-get install oracle-java7-installer — Install Oracle JDK 7
  • sudo apt-get install openjdk-7-jre — Install OpenJDK 7
  • sudo apt-get install openjdk-7-jdk — Install Oracle JDK
  • sudo apt-get install oracle-java6-installer — Install Oracle JDK 6

For more information please refer Unbuntu manual here

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *