If you are just a common user then you need only JRE (Java Runtime Environment) to execute java programs but If are going to write java programs or develop Apps then you need to install Java Development Kit (JDK, complete suite for Java Developers) along with some IDE like Eclipse or Netbeans (Not really necessary for absolute beginners). A lot of JDK’s are available, so if you have programmed before then choose the one you like, but on the other hand, try open-jdk-6, an open source Java Development Kit (contains Javac, an open source Java compiler and ). This post will explain – about installation procedure of Open-JDK on a freshly installed Ubuntu 11.04.
Java logo

Installing Java Development Kit (JDK) on Ubuntu 11.04

#1 : Open Synaptic Package Manager (and click on update button, it’s not necessary but it’s usually a good practice because in this way you will get the latest details about the packages), and search for ‘JDK’ or ‘open jdk’ in the quick search bar.



installing-jdk-ubuntu-11-04

#2 : Then select the package for installation ( by checking the small square box) and click on ok, if it asks for dependencies.

#3 : Now, click on ‘Apply’ button to begin the installation procedure…and wait for the installation to complete.

#4 : That’s All..to verify, open Terminal (CTRL+ALT+T) and type javac, you will see a lot info about the Java Compiler and …

Install JDK from command Line

Open Terminal and enter the following command(s), then enter your ubuntu login password followed by ‘y’ when prompted for yes/no.

sudo apt-get install openjdk-6-jdk