Sunday, November 18, 2012

How to install Eclipse on Ubuntu

Usually, the Eclipse IDE provided by the Software Manager on Ubuntu systems is not up to date. One fast way to use the latest Eclipse IDE is to actually download it from the official website and place it locally. More specifically, on Ubuntu systems, the installation would have the following steps:

1. Depending on the platform (x86 or amd64), download the desired (latest) Eclipse IDE.
Currently, the newest standard version for "Eclipse IDE for Java Developers" is:

2. Copy this to your $HOME/opt directory, as having a personal IDE and not a shared one is always good practice in companies where more users work on the same computer:

There is also the possibility to install just one Eclipse IDE per system in /opt and keep just a personalized configuration file in one's home directory, but I personally prefer and recommend having it entirely installed in $HOME/opt.

$ mkdir ~/opt
$ cp ~/Downloads/eclipse-java-juno-SR1-linux-gtk-x86_64.tar.gz ~/opt

3. Extract it, then remove the archive:

$ cd ~/opt
$ tar xvf eclipse-java-juno-SR1-linux-gtk-x86_64.tar.gz
$ rm eclipse-java-juno-SR1-linux-gtk-x86_64.tar.gz

4. Set the heap memory to 1024 MB in the eclipse.ini file to avoid any future problems:

$ cd ~/opt/eclipse
$ gedit eclipse.ini



Change the last line from "-Xmx512m" to "-Xmx1024m" to specify the maximum range of the heap memory.

While Eclipse works fine without this setting, certain plug-ins can produce memory issues, especially in larger projects.

5. Launch Eclipse for the first time:

$ ~/opt/eclipse/eclipse -clean

6. Launch Eclipse at any time using:

$ ~/opt/eclipse/eclipse

No comments:

Post a Comment