Installing Eclipse on Ubuntu

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.


Author: Darren

A 33 year old geek who was brought up in Kota-Kinabalu, Sabah. I graduated with a Degree in Computer Science majoring in Systems and Networking from Universiti Tenaga Nasional, Selangor. I am a CISCO Certified person with CCNA qualification where I am able to install, configure and maintain Cisco and network devices. With my programming skills, I also develop systems and websites for small companies as a freelancer. Things that interest me are computers and its technologies which had been a thing for me for many years now. I am also an open-source enthusiast. I have worked on an open-source project for my FYP that involves Ubuntu, GTK, and Python. I’ve made it through my Degree and I hope that one day I will be able to contribute in some way to the open source community. Other than that, I am a big fan of TV series and movies. I also like reading especially interesting tech blogs on the web.

6 thoughts on “Installing Eclipse on Ubuntu”

  1. 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 $*

  2. 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).

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s