To install Open JDK, first click on Applications -> Add/Remove. Next, click on Internet in the leftmost panel. Click on the check-box to the left of OpenJDK Java Runtime. Then, click on Programming in the leftmost panel. Click on the check-box to the left of Eclipse. Finally, click on Apply Changes in the lower-right corner of the window.
Now, to install the JDK, run the following command:
sudo apt-get install openjdk-6-jdk
Now, click on Applications -> Accessories -> Terminal; a terminal window should open on the desktop. Now, type the following command in the terminal window:
gksudo gedit /etc/eclipse/java_home
Now, on a line right before /usr/lib/jvm/java-gcj, type the following:
The file should now look like this:
# This file determines the search order the Eclipse Platform uses to find aTo start Eclipse, click on Applications -> Programming -> Eclipse.
Ubuntu Downloads Information