Installing Eclipse Europa

Eclipse is a development platform for Java, C++ (or any other language throught the use of plugins), originally created by IBM (but later released as an open-source project). Eclipse Europa (v 3.3.1.1 at the time I’m writing this article) is not included yet in the Ubuntu source repositories, that means that you cannot install it *properly* through the Synaptic Package Manager or apt-get. Follow this simple tutorial for a smooth and clean installation:

Eclipse Europa

  1. Install the Java 5 runtimes (or later) in case they’re not there already. Run the following in the terminal:
    sudo apt-get install sun-java5-jre
    sudo apt-get install sun-java5-jdk
  2. Download the latest release of Eclipse Classic available on Eclipse Downloads
  3. Extract the downloaded file by running the following:
    tar xzf eclipse-SDK-3.3.1.1-linux-gtk.tar.gz
    sudo mv eclipse /opt/

    Take care of the permissions:
    sudo chmod -R +r /opt/eclipse
    sudo chmod +x /opt/eclipse/eclipse
  4. Create an executable in your path:
    sudo touch /usr/bin/eclipse
    sudo chmod 755 /usr/bin/eclipse
    sudoedit /usr/bin/eclipse

    Copy the following content and save the file:
    #!/bin/sh
    #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
    export ECLIPSE_HOME="/opt/eclipse"
    $ECLIPSE_HOME/eclipse $*

    Let’s also make eclipse executable everywhere by creating a symlink:
    sudo ln -s /usr/bin/eclipse /bin/eclipse
  5. Create the menu icon
    sudoedit /usr/share/applications/eclipse.desktop
    Type in this content and save:
    [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
  6. Run for the first time
    eclipse -clean
    You can now start Eclipse by simply typing eclipse in the terminal or from the GNOME menu Applications -> Programming -> Eclipse

Troubleshoot

  • Error java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin
    This happens if Eclipse is using GNU Java runtimes instead of the Sun one’s. To correct this problem, execute the following:
    update-java-alternatives -l
    sudo update-java-alternatives -s java-1.5.0-sun

Part of the tutorial is based on Ivar’s How to install Eclipse in Ubuntu.


31 Responses to “Installing Eclipse Europa

  • 1
    carlos
    February 5th, 2008 13:55

    Good tutorial.
    Thanks!

  • 2
    Shrinivas Kulkarni
    February 19th, 2008 06:20

    Excellent, flawless tutorial! Thanks for putting this together.

  • 3
    sleeper
    April 21st, 2008 03:45

    Thanks.

  • 4
    DJ
    April 25th, 2008 09:57

    Great tutorial and the only thing that didn’t work for me (installing into 8.04 under Wubi) was the menu entry. But, I don’t have any development menu anyway!

  • 5
    Leo
    May 3rd, 2008 02:49

    Thanks. Excelent tutorial

  • 6
    Kishore
    May 3rd, 2008 09:13

    Just tested this with Hardy (Ubuntu 8.04) .. works perfectly well

  • 7
    Raeder
    May 4th, 2008 01:12

    Hi, I’m new to ubuntu and linux as well (installed today…)

    One small doubt: when you say : “Copy the following content and save the file:”

    How do I save? (yes, it is very basic right?)

    I pasted those lines and then what?

    Sorry for the basic question…

  • 8
    michel
    May 4th, 2008 13:12

    @Raeder: The editor that pops up by default when you type ‘sudoedit ‘ is pico, a terminal text editor. To save,in it, press CTRL + O (WriteOut).
    You can use another editor if you’re not comfortable with this one, such as gedit or kate.

  • 9
    daniel
    May 6th, 2008 15:23

    One small question. Why create the shell script? Couldn’t you simply create a symlink from /opt/eclipse/eclipse to /bin/eclipse? What does setting the variable MOZILLA_FIVE_HOME do?
    Thanks.

  • 10
    michel
    May 6th, 2008 19:20

    @daniel: setting MOZILLA_FIVE_HOME is needed if you want the SWT browser inside eclipse to work correctly. Check http://www.eclipse.org/swt/faq.php#browserlinux

  • 11
    Ben
    May 16th, 2008 03:06

    Awesome tutorial! Great tutorials like this make the transition to linux for newbies like myself much more enjoyable and painless! Thanks again.

  • 12
    doez
    May 16th, 2008 09:40

    thank’s

  • 13
    Maris
    May 26th, 2008 11:33

    Great tutorial!!!!

  • 14
    enofman
    June 6th, 2008 20:32

    Thanks for the GREAT !!!!! tutorial I have been searching for this for 2 days.

  • 15
    El Dani
    June 7th, 2008 16:08

    Thanks a lot! Now I can enjoy Europa with a correct setup (instead of uncompressing all inside /home hehehe)
    Just let me add one thing, in 8.04 an error appeared (“Could not initialize the application’s security component. The most likely cause is problems with files in your application’s profile directory….. etc etc”)
    This error was solved by creating $HOME/.mozilla/eclipse directory by hand (solution from https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/188380)

  • 16
    Wiendietry
    June 8th, 2008 01:35

    Very simple and clear instruction,
    Thanks a lot!

  • 17
    AbhiMAX
    June 11th, 2008 17:50

    Thanks a ton. The steps are described in a very thorough manner. It was a great ride !!!

  • 18
    Mark Nichols
    June 13th, 2008 15:49

    Outstanding guide, thank you.

  • 19
    deano700
    June 22nd, 2008 16:31

    It all seemed to work fine, but I got a dialog with this error when I ran eclipse -clean:
    “The Eclipse executable launcher was unable to locate its companion shared library.”

  • 20
    deano700
    June 22nd, 2008 16:49

    Ok, sorry, I figured it out. It was my sloppy permissions setting. Thanks for your excellent tutorial.

  • 21
    ahmed
    July 4th, 2008 19:12

    nice,
    i was looking around to find some instructions like these unfortunately it’s deep in google search : )

  • 22
    Joshua
    November 29th, 2008 10:37

    This tutorial is great..it solved ma issues at once.I didn’t have to repeat it over and over again,one step i got it right.
    Just wanna make a comment…in step 4 and 5 instead of using
    sudoedit /usr/bin/eclipse
    for those who dont like to edit with the terminal, you could call a text editor using
    sudo gedit /usr/bin/eclipse.
    this command give u a read and write access the file u wanna create.
    The same is applicable with step 5.
    Just replace sudoedit /usr/share/applications/eclipse.desktop with
    sudo gedit /usr/share/applications/eclipse.desktop.
    All the best.
    Josh.

  • 23
    Matt Garcia
    January 24th, 2009 06:02

    Excellent tutorial, I’m a Java developer but I haven’t worked before with Ubuntu Linux. I got tired of Vista. Thanks so much!!

  • 24
    Clement
    March 12th, 2009 20:31

    Precise and strainght forward instructions. Excellent work.

  • 25
    Dunith Dhanushka
    April 30th, 2009 05:20

    Excellent,
    No errors and no pains at all…

    everything was completed according to the order.

    Thank in advance to provide us a great tutorial

  • 26
    nnb
    November 5th, 2009 07:01

    thumb up!!!

  • 27
    Tantra
    December 26th, 2009 15:17

    i’m just new user in ubuntu
    it’s work, no error, excellent
    that’s great tutorial
    Thank’s verymuch.

  • 28
    Siddhi
    March 10th, 2010 14:44

    The installation went smoothly as suggested. But I am not able to run the application, neither from terminal nor from application menu. Both option are unable to start Eclipse.

    I would be grateful if anyone could help me with this.

    Thanks in advance

  • 29
    Jay Khimani
    May 25th, 2010 18:20

    Thanks for this tutorial. It worked just fine.

    Cheers !!!
    - Jay

  • 30
    Eoghan
    July 21st, 2010 15:35

    Excellent tutorial, thank you!

  • 31
    Chr$
    July 21st, 2010 23:42

    Howto even works with new Helios Release (e.g. for JAVA Developers).

    Just download the appropritate Version from http://www.eclipse.org/

Leave a Reply