How to Install Eclipse?
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...
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.
19 Answers
If you've downloaded Eclipse from their official website, follow these steps for the installation.
Extract the eclipse.XX.YY.tar.gz using
tar -zxvf eclipse.XX.YY.tar.gzBecome root and Copy the extracted folder to
/optsudo mv eclipse.XX.YY /optCreate a desktop file and install it:
gedit eclipse.desktopand copy the following to the
eclipse.desktopfile[Desktop Entry] Name=Eclipse Type=Application Exec=env UBUNTU_MENUPROXY=0 eclipse44 Terminal=false Icon=eclipse Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=Eclipseand make sure that it has executable permission, then execute the following command to automatically install it in the unity:
sudo desktop-file-install eclipse.desktopCreate a symlink in
/usr/local/binusingsudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse44For eclipse icon to be displayed in dash, eclipse icon can be added as
sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpmDon'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-jdkLaunch Eclipse and then give it the required permissions to modify the osgi file:
sudo chown -R $USER:$USER /opt/eclipse/configuration/org.eclipse.osgiNB! You must launch Eclipse first, because the org.eclipse.osgi directory is created only after the first launch.
That's it.
Must Read
The preferred method: Software Center
In Ubuntu software center select Eclipse. I installed the Extensible Tool Platform and Java IDE as well, but installing that is optional.
Enter your password in the authentication dialog. This will get you 3.7.1 inside of a package management system.
The least preferred method: Portable
For a portable installation you can still download directly from the Eclipse website. This gives you the ability to customize several Eclipse installations for different languages CDT, Java, and PyDev or Aptana for instance. It doesn't allow automatic updates. Installing through Software Center is always the preferred method.
I tested the portable 3.7.1 and 3.7.2 tar balls and they work just fine on 12.04 LTS.
An added disadvantage to portable installs is that you have to update your launcher if you move the folder or launch it directly.
How to install Eclipse 4.2 on Ubuntu 12.04
Since the Eclipse packages in the Ubuntu repositories are out of date, if we want to install latest releases, we are going to have to do it manually. You can just download the tar.gz file from eclipse.org.
Download Eclipse. I got
eclipse-jee-juno-SR1-linux-gtk.tar.gzExtract it by executing a command line
tar -xzf eclipse-jee-juno-SR1-linux-gtk.tar.gzOr with Archive Manager extraction.
Move extracted eclipse folder to
/opt/ foldermv eclipse /opt/ sudo chown -R root:root /opt/eclipse sudo chmod -R +r /opt/eclipseCreate an eclipse executable in your user path
sudo touch /usr/bin/eclipse sudo chmod 755 /usr/bin/eclipseCreate a file named
eclipsein/usr/bin/with your preferred editor (nano,gedit,vi...)Copy this into it
#!/bin/sh export ECLIPSE_HOME="/opt/eclipse" $ECLIPSE_HOME/eclipse $*And save the file
Create a Gnome menu item
Create a file named
eclipse.desktopin/usr/share/applications/with your preferred editor (nano,gedit,vi...)Copy this into it
[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=trueAnd save the file
Launch Eclipse
/opt/eclipse/eclipse -clean &Now you can Lock Eclipse to the launcher bar by clicking right button on Lock to Laucher
I recommend you to download directly from the eclipse website. the installation process very easy, just extract the files tar.gz, to remove it is also quite easy, simply by deleting the eclipse folder :D
From your desktop, Click on the Ubuntu Software Center
Once it opens do a search for Eclipse
When the search is done, you will see Eclipse listed. all you have to do is click on install, sit back and relax until the installation is done.
If you still have any questions, do not hesitate to ask.