Wednesday, December 31, 2008

How to install Eclipse and Java on a Linux Machine.

After a little bit of Googling I found the easiest and the best way to install Java and Eclipse on a Ubuntu 8.04. The steps given below:


Eclipse is an Integrated Development Environment or IDE. The Eclipse was originally created by IBM, but the Eclipse Foundation has since taken over direction and development of the project. Eclipse started out as a Java IDE, but has since grown into much more.


Ubuntu 8.04 - Hardy Heron

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 a
# compatible JAVA_HOME. This setting may be overridden on a per-user basis by
# altering the JAVA_HOME setting in ~/.eclipse/eclipserc.

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