Thursday 14 June 2012

Installing Eclipse in Linux


The steps outlined below will help you get Eclipse installed on your Linux machine.

1. Go ahead and download the latest Eclipse version, I have eclipse-java-indigo-SR2-linux-gtk.tar.gz


2. Extract your downloaded eclipse

tar -xvf eclipse-java-indigo-SR2-linux-gtk.tar.gz

3. Move it to the folder /opt/ and change ownership as well as file permissions

sudo mv eclipse /opt/
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse

4. Create an eclipse executable in your path

sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo nano /usr/bin/eclipse

type the following into the nano file we just created

#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*

save (Ctrl+o) and exit (Ctrl+x) nano

5. Create a gnome menu item

sudo nano /usr/share/applications/eclipse.desktop

type the code below into nano

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

save (Ctrl+o) and exit (Ctrl+x) nano

6. Launch your Eclipse installation for the first time

/opt/eclipse/eclipse =clean &

Congrats!! Have fun developing.