208

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.

LiveWireBT
  • 28,763
  • Have you tried installing it fro USC? – Mitch May 31 '12 at 10:35
  • 1
    USC? what you mean by that ? I'm new to Ubuntu – Ant's May 31 '12 at 10:38
  • 1
    'Ubuntu Software Center', as shown below. I have installed Eclipse on a couple different computers using the software center method as shown - and then PyDev from inside Eclipse. Works slick. – memilanuk May 31 '12 at 16:29
  • 1
    @memilanuk Unfortunately if you do that you'll have to put up with a version which is almost 2 years old. – Jon Bentley Mar 18 '15 at 11:25
  • @Jon Bentley - you do realize this thread is almost 2 years old.... – memilanuk Mar 18 '15 at 14:36
  • 2
    @memilanuk Of course. I read the dates. My comment is no less valid for someone reading the thread today than it was back then - the package being out of date is even mentioned in the OP (in 2011) as the motivation for the question. The point is that the Ubuntu repositories are not a good source for obtaining the latest version of this particular package. – Jon Bentley Mar 18 '15 at 17:01
  • The selected "right", 200+ vote, community wiki answer might not be the best answer today (December 2017). Scroll down to my answer. – H2ONaCl Dec 07 '17 at 06:31

19 Answers19

254

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]
    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]=Eclipse
    

    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.

bitsbuffer
  • 1,287
  • 11
    I recommend that way, with a minor change: Use the eclipse version when creating a the symlink (eg: ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse42), and use Exec=eclipse42 at the desktop entry. That way you will be able to install multiple different versions of eclipse. – ortang May 27 '13 at 11:36
  • 4
    Don't forget that you need to have either OpenJDK or Sun Java installed to be able to run eclipse. Run sudo apt-get install openjdk-6-jdk or check out this link for Sun Java http://www.ubuntugeek.com/how-to-install-oracle-java-7-in-ubuntu-12-04.html – Andy Braham Oct 05 '13 at 20:06
  • 7
    Also worth noting that for 13.10, eclipse.desktop needs Exec=env UBUNTU_MENUPROXY=0 eclipse in order for the menus to work per http://stackoverflow.com/questions/19452390/ – TimD Nov 25 '13 at 16:46
  • 4
    For steps 2 and 3, I think sudo mv eclipse /opt is more clear and easier for beginners – modulitos Feb 12 '14 at 10:18
  • Recommend an explicit path for icon in your .desktop file. Put Icon=/opt/eclipse/icon.xpm such as @Joe did in his answer. This will avoid file duplication (your step 6) and still have the icon display in the dash and unity launcher. – Clayton Apr 29 '14 at 12:29
  • 1
    I did everything exactly as you explained but it's not working here. It doesn't even show Eclipse on launcher. Using 14.04 – Diogo Moreira May 17 '14 at 19:29
  • It worked for me. – ajay Jul 02 '14 at 18:13
  • 16
    Works for me except /opt/eclipse/configuration/org.eclipse.osgi does not exist... – Gerhard Burger Jul 27 '14 at 09:52
  • I am on 12.04 and 4.4 wouldn't work for some reason, but 4.3 Kepler worked great. I would add that if you plan on trying to install many versions of eclipse renaming the extracted folder with version number before moving to /opt directory is helpful. command might look like sudo mv eclipse43 /opt' and make your menu entryeclipse43.desktop` so you can differentiate as you try different versions – timbrown Aug 12 '14 at 05:37
  • 6
    @GerhardBurger It looks like the folder "/opt/eclipse/configuration/org.eclipse.osgi" does not exist until Eclipse itself is launched ... – dtmland Sep 11 '14 at 21:29
  • 1
    Works on Ubuntu 14.04 – Seanny123 Oct 25 '14 at 01:49
  • 2
    For multiple versions of Eclipse, the launcher icon name should change. In eclipse.desktop, change the Name and Name[en] fields to 'Eclipse Kepler' or whatever is appropriate. – rickfoosusa Jun 26 '15 at 17:59
  • I have downloaded the .tgz files for the c/c++ and the java version of Eclipse from their website. What changes should I make while following the above steps when I install them both? – SY_13 Aug 04 '15 at 04:18
  • 1
    Hi! Seems that now (January 22nd 2016) Eclipse has an installer for Ubuntu. – Victor Jan 22 '16 at 11:45
  • @Victor Just tried it and it fails spectacularly. It seems to install but when you try to actually launch eclipse it gives an error that it's not able to locate the "companion library" or something like that. – Bakuriu Jun 04 '16 at 14:35
  • 1
    Just tried to download it from https://www.eclipse.org/downloads/ and after unpacking the tar.gz run the installer (called "eclipse-inst"). Everything worked just fine. My OS: Ubuntu 14.04 LTS 64bit. – umbe1987 Jul 01 '16 at 21:25
  • Hi. I'm using Ubuntu 16.04 and installing eclipse neon. I've used the desktop file in this reply with the addon for UBUNTU_MENUPROXY suggested by @TimD and it removes the top menu bar integration with unity. I changed that line to be just "Exec=eclipse44" and now the menu bar is properly integrated in the unity window title. – Akronix Apr 27 '17 at 10:39
  • 1
    Another way to avoid the user permissions of osgi configurations file or so, is to run the eclipse binary just after you download it directly from the downloaded folder (before moving to /opt). So, if you downloaded and extracted the eclipse tarball in ~/Downloads just open a terminal there, and run once ./eclipse/eclipse. It'll create the appropriate files under your current user, so you'll move all together thereafter. If you do this, there is no need to do the last step: sudo chown -R $USER:$USER /opt/eclipse/configuration/org.eclipse.osgi – Akronix Apr 27 '17 at 10:56
  • I have been looking for this info for some time. Thank you, and I have given you a bounty. – hat Jan 01 '20 at 11:05
57

The preferred method: Software Center

  1. In Ubuntu software center select Eclipse. I installed the Extensible Tool Platform and Java IDE as well, but installing that is optional.

    eclipse in software center

  2. 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.

user535733
  • 62,253
RobotHumans
  • 29,530
  • 1
    I followed the "preferred method", but curious as to why this is more preferable than the others? – T. Webster May 25 '13 at 05:53
  • Search the site for questions about java apps not showing up in the app switcher and other things(reproducible problems for example). I don't have these issues when I install from repo, but people complain about them consistently when a repo install would have avoided the problem instead of requiring a cheese tray. – RobotHumans May 25 '13 at 05:56
  • Well the preferred method definitely installed cleanly for me. Thanks otherwise I would have chosen the messier method – T. Webster May 25 '13 at 11:31
  • Eclipse Indigo? – Marko Bonaci Oct 13 '13 at 11:58
  • If you need newer eclipse, you have to use portable, but it has loads of unity integration bugs. So you have to change DEs to get predictable behavior with portable eclipse. – RobotHumans Oct 13 '13 at 12:29
  • 3
    This method is definitely easier, although I would combine it with the accepted answer's method for the launcher/desktop shortcut. – ashes999 Jun 16 '14 at 16:18
  • The PPA version doesn't seem to work in 14.04. – Seanny123 Oct 25 '14 at 01:35
  • 4
    @Seanny123 The PPA hasn't been updated since before 12.04. This answer has been around for a while. – RobotHumans Oct 25 '14 at 07:06
  • The preferred method has an outdated version available. – abhishah901 Jan 04 '17 at 06:28
  • You mean the preferred method for a version of the OS that came out 4 years ago? Yes. And I obviously hear that a lot. I can't help that the PPA is not maintained. It's still better to not hit the app switcher and other bugs. – RobotHumans Jan 04 '17 at 09:54
37

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.

  1. Download Eclipse. I got eclipse-jee-juno-SR1-linux-gtk.tar.gz

  2. Extract it by executing a command line

    tar -xzf eclipse-jee-juno-SR1-linux-gtk.tar.gz
    

    Or with Archive Manager extraction.

  3. Move extracted eclipse folder to /opt/ folder

    mv eclipse /opt/
    sudo chown -R root:root /opt/eclipse
    sudo chmod -R +r /opt/eclipse
    
  4. Create an eclipse executable in your user path

    sudo touch /usr/bin/eclipse
    sudo chmod 755 /usr/bin/eclipse
    

    Create a file named eclipse in /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

  5. Create a Gnome menu item

    Create a file named eclipse.desktop in /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=true
    

    And save the file

  6. Launch Eclipse

    /opt/eclipse/eclipse -clean &

  7. Now you can Lock Eclipse to the launcher bar by clicking right button on Lock to Laucher

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
Joe
  • 919
  • 4
    Good instructions, but I think you shouldn't chown and chmod the /opt/eclipse folder. I wasn't able to install plugins after doing that. – TomTasche Apr 30 '13 at 09:05
  • Like in point 3 but with the normal user? – Joe May 04 '13 at 20:30
  • 4
    Simply don't do anything except mv eclipse /opt/ in step 3. – TomTasche May 05 '13 at 16:39
  • 2
    The last line of the script file should be $ECLIPSE_HOME/eclipse "$@" not $ECLIPSE_HOME/eclipse $*. This will preserve things like arguments with spaces in them. – jbo5112 Dec 13 '13 at 21:20
  • 1
    You should probably use /usr/local/bin instead of /usr/bin – kzh Jun 04 '14 at 16:08
  • Working in every ubuntu version but in latest 15.04 giving error bash: /opt/eclipse/eclipse: No such file or directory. – Manwal Aug 27 '15 at 12:48
17

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

  • I agree with this. Most users will be served perfectly well by installing Eclipse in their own home directories, just for them. Eclipse's built-in package manager can be used to keep it updated and install new components. Different users on the same machine will likely want to install different packages for Eclipse and may even want to use different major versions. Similarly, for versions of Eclipse that provide an installer executable, most users will still want to install in their home directories (and not change ownership or permissions). – Eliah Kagan Sep 10 '17 at 03:23
11

From your desktop, Click on the Ubuntu Software Center enter image description here

Once it opens do a search for Eclipse

enter image description here

enter image description here

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.

Mitch
  • 107,631
  • 3
    How do we install eclipse version 4.2 (SR2) with Ubuntu Software Center? It appears version 3.8 – Joe May 04 '13 at 20:26
  • Using the USC pretty much always pulls down a version (or whatever it is you're after) which is 2+ years old. Apparently it would take too much time for someone to check whether or not the latest version of large, popular programs work on the latest version of ubuntu. –  Dec 21 '16 at 10:42
10

This is the instructions copied from http://www.inforbiro.com/blog-eng/ubuntu-12-04-eclipse-installation/

How to install Eclipse IDE platform on Ubuntu 12.04 LTS Precise Pangolin

1) Open a terminal and enter the command

sudo apt-get install eclipse-platform

2) After Eclipse is installed you can install development plugins based on your needs, e.g.:

will install Java Development Tools (JDT) package for Eclipse

sudo apt-get install eclipse-jdt

will install C/C++ development tools packages for Eclipse

sudo apt-get install eclipse-cdt
Anders
  • 1,585
8

You can use ubuntu-make to install Eclipse on Ubuntu :

Installing Ubuntu Make :

For Ubuntu 14.04 LTS :

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make

For Ubuntu 16.04 LTS and newer :

Ubuntu make is already in the official repositories.

sudo apt-get install ubuntu-make

Installing Eclipse :

umake ide eclipse

Uninstall Eclipse :

umake ide eclipse --remove
N0rbert
  • 99,918
hg8
  • 13,462
  • 2
    does it install latest eclipse ? – Soumyadip Das Oct 29 '15 at 09:12
  • 4
    "Ubuntu make is fetching always latest release version from upstream..." - Ubuntu Make Wiki ;) – hg8 Oct 29 '15 at 09:42
  • 1
    On Ubuntu 16.10, I used the official repositories to install Ubuntu Make 16.05. Ubuntu Make whined about the download page changed its syntax or is not parsable. I solved that by following the instructions in this answer for the older versions of Ubuntu. I.e, I added the repository manually and then installed Ubuntu make and then installed Eclipse. – Martin Andersson Dec 01 '16 at 20:12
  • 1
    To script the installation of both, I first did sudo add-apt-repository -y ppa:ubuntu-desktop/ubuntu-make, then sudo apt-get update, finally sudo umake ide eclipse-jee dest-dir=/apps/eclipse. – Martin Andersson Dec 01 '16 at 20:13
  • Currently it fetches Eclipse Java EE IDE for Web Developers, Version: Neon.2 Release (4.6.2), Build id: 20161208-0600 – Michael S. Feb 01 '17 at 17:44
6

Always download the packaged eclipse from their website. Its best for you to place the eclipse.tar.gz into your opt directory and create symbolic to it and use that around your system.

So if you end up upgrading in the future, all your shortcuts and links wont die.

This is the preferred setup for eclipse. IMO

myusuf3
  • 34,189
4

I created this little script to install on a bunch of Cinnamon machines. You might have to change specific stuff for your needs but you can use this as a template for your own.

#!/usr/bin/env bash

wget -P /tmp/ http://eclipse.mirror.triple-it.nl/technology/epp/downloads/release/kepler/SR1/eclipse-standard-kepler-SR1-linux-gtk-x86_64.tar.gz

tar -xzf /tmp/eclipse-standard-kepler-SR1-linux-gtk-x86_64.tar.gz -C /opt/
chown -R root: /opt/eclipse/

cat <<- 'EOF' > /usr/bin/eclipse42
    #!/bin/sh    
    export ECLIPSE_HOME="/opt/eclipse"
    $ECLIPSE_HOME/eclipse "$@"
EOF

chmod +x /usr/bin/eclipse42

cat <<- EOF > /usr/share/applications/eclipse42.desktop
    [Desktop Entry]
    Encoding=UTF-8
    Name=Eclipse
    Comment=Eclipse IDE
    Exec=eclipse42
    Icon=/opt/eclipse/icon.xpm
    Terminal=false
    Type=Application
    Categories=GNOME;Application;Development;IDE;
    StartupNotify=true
EOF

You can now run Kepler by typing eclipse42 or wait for the menu to refresh (or enter restart) to find it there.

Feel free to comment changes you'd recommend.

Redsandro
  • 3,674
  • 2
    You should not install something under /usr/* unless you prepare a dpk. You should install your own administrator files under /usr/local/* or /opt/NAME/*. Because for exampel /usr/bin is for the systems/distributions packages, /usr/local/bin is for administrators own files and /opt/PACKAGE/bin is for the commercial software PACKAGE. If you install in /opt/PACKAGE it is usually easiest to make a script or links in /usr/local/bin that start the program. In that way it is reachable from all users PATH. – Anders May 18 '15 at 12:27
3

As with any other Eclipse version, you don't have to get it from the repositories. Just download the appropriate archive from eclipse.org, extract and run Eclipse.

Eclipse in the repositories is often outdated. It is usually updated every ubuntu release.

3

Use the official installer (instructions).

For the Mars release, we are introducing a new Eclipse installer. This is a new and more efficient way to install Eclipse. It is a proper installer, so no more zip files, with a self extracting download that will lead you through the installation experience. For those not into installers, we still have the packages and zip files available on our download pages. -- Eclipse Downloads

Nabil Kadimi
  • 2,212
2

I'm using Ubuntu GNOME 16.04 and the version in the software center is old. I followed the start of the community answer by downloading eclipse from their website then unpackaged with:

tar -zxvf eclipse.XX.YY.tar.gz

After that it was as simple as doing:

cd eclipse-isntaller/
./eclipse-inst

Then a GUI walk through will pop up.

After that you can delete both the tar.gz and the folder:

rm eclipse-inst-linux64.tar.gz 
rm -rf ./eclipse-installer/
1

If you are asking about the eclipse classic the latest version from the eclipse project is 3.7.2: and you you can download the tar ball from the website for your OS here:

http://www.eclipse.org/downloads/packages/eclipse-classic-372/indigosr2

The latest version in the Ubuntu Software Center is Eclipse 3.7.1; either download it from there or use the terminal with this command line:

 sudo apt-get install eclipse && sudo apt-get update

As far as a PPA? There appears to be no current or maintained PPA for eclipse classic. The PPA page at LaunchPad still exists but there has not been any activity for what appears to be two years now. You can check out the PPA page here:

https://launchpad.net/~eclipse-team/+archive/ppa

The best way to install eclipse classic and the latest version 3.7.2 is from the Eclipse Classic project download page for your OS version. Warning: Eclipse 3.7.2 is built and developed for Ubuntu 10.04 LTS according to the Eclipse Project "Read Me" html documentation. There have been known "will not start issues" with later Ubuntu versions due to the compatibility of Java Runtime Enviroments; it works with JRE6 rather than JRE7. Good Luck :)

hg8
  • 13,462
Gryphon
  • 11
1

The eclipse snap package provides an easy way to install the latest stable version of Eclipse IDE for Java Developers in all currently supported versions of Ubuntu. Different Eclipse versions are distinguished by their codenames. Eclipse releases from September 2018 and onward are named after the year and month of the release date, for example Eclipse 2020-06. This naming scheme also applies to the eclipse snap package.

To install the eclipse snap package open the terminal and type:

sudo snap install eclipse --classic  

This command would install Eclipse 2019-12 at the time this was posted. Eclipse 2019-12 supports openjdk-13-jdk which is provided by the default Ubuntu repositories in Ubuntu 20.04 and later. It also supports openjdk-8-jdk and openjdk-11-jdk.

karel
  • 114,770
1
mkdir ~/opt

Change directory to the folder where your browser downloaded the Eclipse package to. Then unpack Eclipse into the opt folder:

cd {directory where your browser downloaded the package to}
tar -zxvf eclipse-jee-juno-SR1-linux-gtk.tar.gz && mv eclipse ~/opt

Make a bin folder in your home directory, this will be used for the startup script:

mkdir ~/bin

Next create an executable for Eclipe at ~/bin/eclipse with your favorite text editor by typing vi ~/bin/eclipse or nano ~/bin/eclipse into the command line. Add the following content:

export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="$HOME/opt/eclipse"
$ECLIPSE_HOME/eclipse $*

Finally, allow the script to be executed:

chmod +x ~/bin/eclipse

HINT: If you are a gtk user and experience problems with the mouse buttons you should try add an export:

export GDK_NATIVE_WINDOWS=true

to the starter file.

You can now execute that file to start up Eclipse.

Eric Carvalho
  • 54,385
Shastry
  • 11
  • 1
    You should probably move your ~/bin/eclipse to /usr/local/bin/eclipse (or with a version added)and /usr/local/bin/eclipse a link to the one you want to use). /usr/local/bin is in every users PATH, which probably is a good thing. – Anders May 18 '15 at 12:31
1

If you have already installed eclipse from the software center, there is an easier way.
If you haven't, do that first.

cd ~/Downloads  # (or wherever your tar.gz is)
sudo tar -xf eclipse.*.tar.gz '/opt'
sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse

Note: much of this process is just tweaked from the top answer to be easier.

josephsmendoza
  • 53
  • 2
  • 11
0

I found it very easy to install from the repository. But because that is probably an outdated version, I also went to eclipse.org and downloaded from there; installing that is also very easy.

What you will get today, as of june 2016, is the eclipse Mars installer. Just save the download somewhere, untar with tar xvf bla...tgz, find the biggest file, i.e. eclipse-inst, file eclipse-inst will confirm that is an executable, and run it with ./eclipse-inst.

The installer gives you a choice of several kinds of eclipse. Choose one, and go ahead. After a few minutes you will see the button Launch, and you are running the recent version of eclipse.

I did not care about the dependencies, and everything just worked. I assume that by the previous install from the ubuntu repository, the JRE etc. are taken care of.

The only thing left is that the Ubuntu menu system only knows the outdated version from the repository. To start the new version, you would have to get to the executable in the location that is mentioned by the installer during the installation of the version you chose, most probably in a directory very near to that of the installer.

The easiest way to get the new eclipse in the menu system might be to use the ubuntu package classicmenu-indicator, enable the menu for Alacarte and use that to alter the icon for Programming/Eclipse to change the path from the old version from the repository to the new version from the download.

Roland
  • 194
0

1) See what eclipse programs Ubuntu has in its Store

apt-cache search eclipse

Breakdown: search in apt-cache for any programs called “eclipse”. enter image description here

2) sudo apt-get install eclipse

Result is that Ubuntu will install Eclipse

Gene
  • 111
  • 1
    It doesn't say what version of Eclipse. This could present a problem if your installed JDK is higher than that required by Eclipse . . . – Trunk Jan 29 '21 at 20:34
0

I agree with Nabil Kadimi and nickguletskii. Essentially you get a compressed download from eclipse.org. I want to post my answer here because I want to add some details.

Why this answer was written

Unlike most of the answers here, my answer does not involve Ubuntu Software Centre which will often be out-of-date, and it does not involve the command line, and does not introduce variability associated with the command line (Example: exactly what are the minimum chmod permissions? Exactly what tar options do I need?) and other uncertainties. It does not involve apt or apt-get. It does not involve editing files with vi. It does not involve setting up environment variables. It's not that those answers are wrong, it's just that I think that if we avoid the command line it is easier and it means more of us end up with exactly the same setup which is good for (uncompensated) testing and feedback. The following assumes you are already using an older version of Eclipse which I believe makes this answer more relevant to many readers.

The answer

  1. Backup your source code by backing up the entire Eclipse workspace that you have been using up until this point in time.
  2. In recent releases of Eclipse an "Installer" is available from eclipse.org. It might have a file name similar to eclipse-inst-linux64.tar.gz. Recognize that it has "inst" or something similar in the file name. Download it.
  3. Cut and paste it to wherever you prefer. There is a convention that the opt directory in the Linux file system hierarchy is suitable but you do not have to follow that convention and Eclipse does not care.
  4. Use the GUI to extract the file. The GUI would be Nautilus by default in 16.04.
  5. Use the GUI to invoke the executable installer eclipse-inst.
  6. The installer lets you launch Eclipse immediately so go ahead. Browse to the Eclipse workspace you have been using. The new version of Eclipse will upgrade the meta-data of your workspace (projects). This is irreversible so that's why you made a backup.
  7. Quit Eclipse.
  8. Delete the Eclipse icon from the Ubuntu Launcher.
  9. Delete the file ~/.local/share/applications/eclipse.desktop.
  10. Use the GUI to browse to the new installation of Eclipse and invoke the executable called eclipse.
  11. Find the Eclipse icon on the Ubuntu Launcher and right-click and Lock to Launcher. This will create a new file at ~./local/share/applications/eclipse.desktop but you don't need to be aware of it until some time in the future when you want to upgrade Eclipse again. At that time, you would delete the file in step 9.
H2ONaCl
  • 9,693