This is an old revision of the document!


Eclipse

FIXME Explain Eclipse (→ especially that it is a platform, and common Editors are Plugins using this platform)

FIXME Explain Eclipse Workspaces

FIXME Settings are stored within the workspace. Putting them into a Dropbox or comparable may be useful.

Installation

Ubuntu

10.04 Lucid and above

Because Eclipse is written in Java, you need a functional Java Runtime Environment (JRE) before you can use it.

Installation, using the package manager

The Ubuntu repositories are showing a tendency to serve very old Eclipse versions.1) Ubuntu is no rolling release and this is also no problem regrading security, but the lack of new features and Plugins often hurts. Therefore you may consider the manual installation method which also provides some other benefits. Otherwise, simply install the following package(s):

  • eclipse (universe) – Provides the Eclipse platform, Java Development Tools (JDT) and the Plugin Development Environment (PDE)
Manual installation

A manual installation of Eclipse is not very problematic because it is a Java program, does not have much external dependencies and brings a built-in update mechanism. This makes Eclipse a very “portable” application. Therefore this is one of the rare cases where you won't loose any comfort and security by bypassing Ubuntu's package manager.

Main benefits of a manual installation:

  • You can use the newest available Eclipse version.
  • You can install Eclipse into a directory your user account got write access to (like ~/.eclipse):
    • This makes Plugin installations much easier.
    • You can use Eclipse even if you got no superuser privileges on the system (→ PC in your office or things like that).
    • You can move Eclipse around if you want to put it into another directory someday.
  • If you are using Dropbox or a comparable service, you may install the whole application into a synced directory. So you don't have to install Eclipse on every machine and all of your Plugins etc. are in sync.

To install Eclipse manually:

  1. Download the Eclipse version which fits best.
    The difference between all the offered packages are the Plugins which are installed by default.2) So don't worry: you can install additional Plugins later if you need a special functionality. E.g. if you are developing PHP and C++, there is no problem to start with “Eclipse for PHP Developers” and install the C++ Development Tools (CDT) Plugin after the basic Eclipse installation is done.
  2. Uncompress Eclipse:
    • If you are the only one using Eclipse on the target system, choose a directory you got write-access to3) (e.g. a directory within your home directory). You can move Eclipse later if you think the chosen directory does not fit your needs anymore. The following commands are using the dir /home/${USER}/.eclipse, simply replace it if you want to install Eclipse somewhere else:
      mkdir -p "/home/${USER}/.eclipse"
      tar xvfz ./eclipse-<version>-linux-gtk-<version>.tar.gz -C "/home/${USER}/.eclipse"
    • If you want to share the installation with other users on your PC, you probably want to uncompress Eclipse into /opt (superuser privileges needed):
      sudo tar xvfz ./eclipse-<version>-linux-gtk-<version>.tar.gz -C /opt
  3. Open a terminal to create a launcher script:
    • Open editor:
      gksudo gedit /usr/local/bin/eclipse
    • Put the following content into the file:
      #!/bin/bash
      #Eclipse starter. See http://readm3.org/app/eclipse/ for details
      export ECLIPSE_HOME="/home/${USER}/.eclipse" #directory where Eclipse was installed into (without trailing slash)
      export GDK_NATIVE_WINDOWS=1 #workaround to prevent "not working buttons", see http://blog.andreas-haerter.com/2010/07/24/what-gdk-native-windows-1-does
      export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
      
      ${ECLIPSE_HOME}/eclipse "$@" -vmargs -Xms256M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M

      If you did not install Eclipse into /home/${USER}/.eclipse, replace the value of ECLIPSE_HOME with the directory you used.

    • Make the script executable:
      sudo chmod a+x /usr/local/bin/eclipse

Plugins

1)
this is especially true for Ubuntu 9.04 Jaunty which served Eclipse 3.2, a two year old version!
2)
e.g. “Eclipse for PHP Developers” simply ships Eclipse + the PHP Development Tools (PDT) Plugin
3)
this makes Plugin installations much easier
Print/export
QR Code
QR Code app:eclipse:start (generated for current page)
Languages
Translations of this page: