Install Eclipse In Ubuntu


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:

/usr/lib/jvm/java-6-openjdk

The file should now look like this:

# This file determines the search order the Eclipse Platform uses to find a
# compatible JAVA_HOME. This setting may be overridden on a per-user basis by
# altering the JAVA_HOME setting in ~/.eclipse/eclipserc.

#/usr/lib/jvm/java-7-icedtea
/usr/lib/jvm/java-6-openjdk
/usr/lib/jvm/java-gcj

...
To start Eclipse, click on Applications -> Programming -> Eclipse.