Skip to content

Installing Eclipse on Ubuntu

April 10, 2010

An easy way to install Eclipse on Ubuntu is through the Ubuntu repositories. This can be done by opening up the “Ubuntu Software Center” under Applications. Click on Developer Tools -> IDEs. Then look for Eclipse from the list of IDEs that shows up. If you click on Install, you will be asked to enter your user password then it will automatically install Eclipse for you. It should be pretty straight forward here. After installation is complete, you can start Eclipse in Applications -> Programming -> Eclipse.

Another way is to install it manually by downloading the Eclipse files from You will need to install JRE or JDK first before you can run Eclipse. You can do this by typing this in the terminal.

sudo apt-get install sun-java6-jre

Extract the Eclipse files to the /opt directory so that other users can have access to it.

tar xzf eclipse-SDK-3.5.2-linux-gtk.tar.gz
sudo mv eclipse /opt/eclipse

Then create an eclipse executable in your path.

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

Then type in the followings and save.

#export MOZILLA_FIVE_HOME=”/usr/lib/mozilla/”
export ECLIPSE_HOME=”/opt/eclipse”
$ECLIPSE_HOME/eclipse $*

Then create a gnome menu item.

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

Enter the following and save.

[Desktop Entry]
Comment=Eclipse IDE

Now you can run Eclipse from Applications -> Programming -> Eclipse. You can also install different Eclipse packages for example the Eclipse + PDT package by using the manual way of installing.

6 Comments leave one →
  1. Christian permalink
    March 22, 2011 3:32 am

    Great guide. Very helpful.

    Thanks :)

  2. Biswa permalink
    May 31, 2011 10:39 pm

    Really nice to follow this.

  3. August 25, 2011 2:34 am

    Very helpful,
    but in the script:

    #export MOZILLA_FIVE_HOME=”/usr/lib/mozilla/”
    export ECLIPSE_HOME=”/opt/eclipse”
    $ECLIPSE_HOME/eclipse $*

    I had to remove the quotes for eclipse to start:

    #export MOZILLA_FIVE_HOME=/usr/lib/mozilla/
    export ECLIPSE_HOME=/opt/eclipse
    $ECLIPSE_HOME/eclipse $*

  4. deter permalink
    September 19, 2011 11:48 am

    Nice tutorial..Very easy to follow.

  5. May 13, 2012 7:17 am

    Current thinking in Linux filesystem hierarchy is not to mess with anything in /usr except for /usr/local. The reason for that is the /usr tree is the exclusive domain of the package management system being used.

    You could use /usr/local/bin, which should already be included in the path variable. However, since eclipse in the above example is not installed in /usr/local (which it could be), the script used to run it should similarly not be anywhere in the /usr tree.

    Instead, it is better to create the directory /opt/bin and add that to the path variable in /etc/profile (so that it is system-wide in a multi-user system). By design, /opt should have in it a complete copy like /usr (bin, etc, share, lib, include…etc), and the path variable should already include /opt/bin, but many distros do not do this.

    Sadly, even the official Linux filesystem hierarchy document is internally inconsistent when it comes to /usr/local and /opt. Many system administrators who administer multi-user environments use /usr/local for anything that is compiled locally and then installed, and /opt for anything that is distributed as a pre-compiled binary package.

    For a single-user system, the entire convention can be disregarded and eclipse can be installed in the user’s /home directory. Indeed, the eclipse developers also recommend this option in multi-user environments in certain circumstances.

    But it’s always a good idea to avoid messing with /usr (except /usr/local).

  6. August 8, 2013 4:10 am

    Ahaa, its pleasant discussion regarding this piece
    of writing at this place at this weblog, I have read all that, so
    now me also commenting here.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: