Friday, January 8, 2016

How to install Java SDK on Ubuntu


Even though you are not a java programmer, i bet you still need to install java for running software that requires java. In this article i will show you how to install java (JDK/JRE) on ubuntu.

Note that we are going to use open JDK for this tutorial, which available on repository of ubuntu, but before we begin, let me explain something to you.

If you want to run java application most likely you only need to install JRE (Java Runtime Environment), but if you want to develop program with java then you will need to install JDK (Java Development Kit).

Java development kit (JDK) already includes JRE inside, so if you install JDK then you don't need to install JRE anymore. Currently there are three version of open JDK by the time i wrote this article, open JDK 6, 7, and 8.

I strongly suggest for you to install the latest one which is the open JDK 8, but of course you can install the older version if you think the latest JDK is not necessary. 

How to install JRE only on ubuntu

Open terminal/console/command line on ubuntu (press CTRL + ALT + T) and then type one of the following command:

open JDK 6 runtime environment
sudo apt-get install openjdk-6-jre

open JDK 7 runtime environment
sudo apt-get install openjdk-7-jre

open JDK 8 runtime environment
sudo apt-get install openjdk-8-jre

How to install JDK (includes JRE) on ubuntu

Open terminal/console/command line on ubuntu (press CTRL + ALT + T) and then type one of the following command:

Open JDK 6
sudo apt-get install openjdk-6-jdk

Open JDK 7
sudo apt-get install openjdk-7-jdk

Open JDK 8
sudo apt-get install openjdk-8-jdk

If you are installing open JDK on your ubuntu, you can start developing java application, you can use pretty much any text editor or you can pick up IDE for java such as netbeans, eclipse, etc so that you can start doing some java programming.

No comments:

Post a Comment