Ubuntu – How to install Eclipse

eclipseppasoftware installation

I want to install the latest version of Eclipse but the Ubuntu Software Centre contains an older version.

Is there a PPA or some other way to install latest Eclipse?
Please describe the steps for full installation.

Best Answer

If you've downloaded Eclipse from their official website, follow these steps for the installation.

  1. Extract the eclipse.XX.YY.tar.gz using

    tar -zxvf eclipse.XX.YY.tar.gz
  2. Become root and Copy the extracted folder to /opt

    sudo mv eclipse.XX.YY /opt
  3. Create a desktop file and install it:

    gedit eclipse.desktop

    and copy the following to the eclipse.desktop file

    [Desktop Entry]
    Exec=env UBUNTU_MENUPROXY=0 eclipse44
    Comment=Integrated Development Environment

    and make sure that it has executable permission, then execute the following command to automatically install it in the unity:

    sudo desktop-file-install eclipse.desktop
  4. Create a symlink in /usr/local/bin using

    sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse44
  5. For eclipse icon to be displayed in dash, eclipse icon can be added as

    sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm
  6. Don't forget that you need to have either OpenJDK or Sun Java installed to be able to run eclipse. Check this question for more information about Java installation. Here is a simple example of installing Open JDK 1.6:

    sudo apt-get install openjdk-6-jdk
  7. Launch Eclipse and then give it the required permissions to modify the osgi file:

    sudo chown -R $USER:$USER /opt/eclipse/configuration/org.eclipse.osgi

    NB! You must launch Eclipse first, because the org.eclipse.osgi directory is created only after the first launch.

That's it.

Related Question