{{announcement.body}}
{{announcement.title}}

Advice for Upgrading Eclipse

DZone 's Guide to

Advice for Upgrading Eclipse

Learn why it's important to keep your Eclipse IDE up-to-date.

· Java Zone ·
Free Resource

Upgrading Eclipse

Learn why it's important to keep your Eclipse IDE up-to-date.

I recently tried to install the Spring tool 4 plugin on Eclipse only to find that it was not compatible with my existing version of Eclipse (Neon). This was actually why it was not showing up in the Eclipse marketplace as well. Because of this issue, I realized why it is so important to maintain Eclipse and keep it up-to-date.

As Java developers, we rely heavily on Eclipse, hence it makes sense to update it frequently. In this article, we will explain the process for upgrading your existing Eclipse IDE.

You may also like:  15 Productivity Tips for Eclipse Java IDE Users

Why Not Install the Newest Version From Scratch?

I did think about installing the newest version of Eclipse rather than performing an upgrade. But then I realized this would be too tedious since I would have to set up a new workspace, add in all the tools I'd used previously, set my preferred short cut keys, proxy,  etc.

Also, Eclipse has frequent upgrades, so reinstalling an IDE this frequently would not be practical. The good news for developers is that upgrades come with the option to upgrade the workspace as well.

Cheers to the Eclipse community for that!

How to Upgrade

Without further ado, here is what you need to do to successfully upgrade Eclipse.

Spoiler: I will touch upon the issues I faced in the next section.

  1. On the toolbar, navigate to Window > Install New Software. Click on Add and add the following URL for the latest build of Eclipse: https://download.eclipse.org/releases/latest/ .
  2. Alternatively, you could add the specific build of Eclipse you want from https://download.eclipse.org/releases/ such as: https://download.eclipse.org/releases/photon/ or https://download.eclipse.org/releases/2019-09/
  3. Once the site is added to Eclipse, you can now proceed with the upgrade by navigating to Window > Help > Check for Updates. This basically goes through all the sites under Window > Preferences > Install/Update > Available Software Sites and gathers update details from the ones that are selected.
  4. You can now see a pop-up listing the various plugins/tools that require an update.
  5. You have the option to select the ones that you need, or you can leave it as is. Then, click Next.
  6. Click Next after reviewing the details.
  7. You should now see the review license page. Click on the radio button "I accept ...." and click Finish.

Issues Faced

Here is a gist of the major issues I faced when upgrading Eclipse, and how I resolved them.

Artifact Not Found

The most popular type of issues I faced was: An error occurred while collecting items to be installed....Artifact not fou.

Here is one such example:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.recommenders.apidocs,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.apidocs.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.calls,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.calls.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.chain.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.completion.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.constructors,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.constructors.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.coordinates,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.coordinates.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.injection,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.jayes,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.jayes.io,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.jdt,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.models,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.models.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.net,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.overrides,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.overrides.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.subwords.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.types.rcp,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.utils,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.utils.rcp,2.5.4.v20180909-1132
Multiple problems occurred while downloading.
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.api_1.0.3.v20170405-0725.jar.pack.gz.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.api_1.0.3.v20170405-0725.jar.pack.gz
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.api_1.0.3.v20170405-0725.jar.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.api_1.0.3.v20170405-0725.jar
Multiple problems occurred while downloading.
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar.pack.gz.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar.pack.gz
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar
Multiple problems occurred while downloading.
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.impl_1.0.3.v20170405-0725.jar.pack.gz.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.impl_1.0.3.v20170405-0725.jar.pack.gz
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.impl_1.0.3.v20170405-0725.jar.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.impl_1.0.3.v20170405-0725.jar
Multiple problems occurred while downloading.
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar.pack.gz.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar.pack.gz
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar
Multiple problems occurred while downloading.
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.transport.file_1.0.3.v20170405-0725.jar.pack.gz.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.transport.file_1.0.3.v20170405-0725.jar.pack.gz
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.transport.file_1.0.3.v20170405-0725.jar.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.transport.file_1.0.3.v20170405-0725.jar
Multiple problems occurred while downloading.
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar.pack.gz.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar.pack.gz
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar
Multiple problems occurred while downloading.
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.util_1.0.3.v20170405-0725.jar.pack.gz.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.util_1.0.3.v20170405-0725.jar.pack.gz
Artifact not found: http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.util_1.0.3.v20170405-0725.jar.
http://download.eclipse.org/recommenders/updates/stable/plugins/org.apache.maven.resolver.util_1.0.3.v20170405-0725.jar
No repository found containing: org.eclipse.update.feature,org.eclipse.recommenders.rcp.feature,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.statics,2.5.4.v20180909-1132
No repository found containing: osgi.bundle,org.eclipse.recommenders.statics.rcp,2.5.4.v20180909-1132


What this is trying to convey is that, as part of the upgrade, we need to install the recommenders plugin. However, none of the repositories added earlier contain this plugin. (For those who are unfamiliar, recommenders is what assists with auto-complete in Eclipse.)

The fix for this is to configure the functional site by modifying the Available Software Site's location of the recommenders plugin to the correct (current/active) one.

The correct repository link can be obtained by a quick Google search. In this case, the correct location is https://repo.eclipse.org/content/shadows/releases.unzip/org/eclipse/recommenders/stable/2.5.4/stable-2.5.4.zip-unzip/.

Eclipse Marketplace Not Available in Eclipse

This was a shocker to me as the marketplace is where I get all of my plugins. But, it turns out that even this needs to be installed explicitly. The same process applies here just like any other Eclipse plugin. Add the link http://download.eclipse.org/mpc/photon to the list of Available Software Sites and ask Eclipse to Check for new updates. You can find further details here.

Missing 'tools.jar'

Missing 'tools.jar'

This occurs when Eclipse is started on a JRE rather than a JDK. And since Eclipse is an IDE, it surely requires jars from the JDK as well. A simple way to check what JRE/JDK is being used by Eclipse is by navigating to Help > About Eclipse IDE > Installation Details > Configuration and searching for the parameter  -vm. If this is not the right JDK you want Eclipse to start with, explicitly add the installation path in the  eclipse.ini (as shown below) file kept at the root of the Eclipse installation folder.

-vm
path/to/jdk/bin


Note: Ensure that the argument  -vm is added before the  -vmargs argument.

Closing Statements

This wraps up this post on upgrading, and troubleshooting, Eclipse. Here is the official link for Eclipse upgrades.

Please share your thoughts in the comments, and don't forget to give this post a like!

Further Reading

15 Productivity Tips for Eclipse Java IDE Users

[DZone Refcard] Getting Started With Eclipse

[DZone Refcard] Eclipse Tools for Spring

Topics:
eclipse ide ,upgrade ,eclipse neon ,java ,eclipse ,spring

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}