Using Eclipse 4.16

Red Hat Developer Tools 1

Installing Eclipse 4.16 and the first steps with the application

Eva-Lotte Gebhardt

Olga Tikhomirova

Supriya Takkhi

Peter Macko

Kevin Owen

Yana Hontyk

Red Hat Developer Group Documentation Team

Abstract

Information for users installing and starting to use Red Hat Developer Tools.

Chapter 1. Eclipse 4.16

Red Hat Developer Tools for Red Hat Enterprise Linux 7 and Red Hat Enterprise Linux 8 is an offering for developers on the RHEL platform that includes Eclipse 4.16, which is based on the Eclipse Foundation’s 2020-06 release train.

The Eclipse development environment provides tools for each phase of the development process. Eclipse 4.16 on RHEL 7 supports C, C++, and Java development, on RHEL 8 Eclipse supports Java development only. Additional components can be installed.

To learn more about Eclipse, see the main Eclipse foundation page.

Sample Eclipse session

Sample Eclipse Session

Eclipse provides a graphical development environment and is therefore an alternative to using the command-line interface.

For an overview of how to develop applications for Red Hat JBoss Middleware or for support of OpenShift Tools, see Red Hat Developer Studio.

1.1. Enabling access to Eclipse RPMs on Red Hat Enterprise Linux 7

Eclipse is part of the Red Hat Developer Tools content set for RHEL 7. To install Eclipse, enable the Red Hat Developer Tools, Red Hat Software Collections, and Optional repositories using the Red Hat Subscription Management utility.

Prerequisites

  • The host must be registered and attached to a subscription. For more information on registering your system using Red Hat Subscription Management and associating it with subscriptions, see the Red Hat Subscription Management collection of guides.

Procedure

Choose the system variant, either workstation or server, to use in the following commands. Red Hat recommends to choose server for access to the widest range of development tools.

  1. Enable the rhel-7-variant-devtools-rpms repository to access Red Hat Developer Tools:

    # subscription-manager repos --enable rhel-7-variant-devtools-rpms
  2. Enable the rhel-variant-rhscl-7-rpms repository to acces Red Hat Software Collections:

    # subscription-manager repos --enable rhel-variant-rhscl-7-rpms
  3. Enable the rhel-7-variant-optional-rpms repository to access additional components:

    # subscription-manager repos --enable rhel-7-variant-optional-rpms

Optional: Enabling the Red Hat Developer Tools debuginfo repositories

The Red Hat Developer Tools offering also provides debuginfo packages for all architecture-dependent RPMs in the repositories. These packages are useful for core-file analysis and for debugging Eclipse itself.

Procedure

  • Enable the Red Hat Developer Tools debuginfo repositories and replace variant with the Red Hat Enterprise Linux system variant (server or workstation):

    # subscription-manager repos --enable rhel-7-variant-devtools-debug-rpms
  • Enable the Red Hat Software Collections debuginfo repository:
# subscription-manager repos --enable rhel-__variant__-rhscl-7-debug-rpms

Additional resources

1.2. Installing Eclipse

The following section describes how to install Eclipse.

Prerequisites

Procedure

  • On RHEL 7, run the following command:
# yum install rh-eclipse
  • On RHEL 8, run the following command:
# yum module install eclipse

1.2.1. Installing additional Eclipse components for RHEL 8

Eclipse 4.16 on RHEL 8 supports Java development only. To install more components from the upstream repositories, for example to support C, C++ or Git, use the Install New Software wizard or Eclipse Marketplace Client.

Procedure

1.2.1.1. Example: Installing C and C++ Development Tooling (CDT) using the Eclipse Marketplace Client

Prerequisites

  • Eclipse Marketplace Client must be installed.

To install the Eclipse Marketplace Client using the Install New Software wizard, in the main menu select Help > Install New Software, select Work with: --All Available Sites-- and choose Marketplace Client under the General Purpose Tools tab. Click Next > and follow the instructions on the screen.

Eclipse Marketplace
  • To install the Eclipse Marketplace Client from the command line, execute the following command while Eclipse is not running:
$ eclipse -noSplash -application org.eclipse.equinox.p2.director -repository https://download.eclipse.org/releases/2020-09 -i org.eclipse.epp.mpc.feature.group

Eclipse Marketplace Client is installed.

Procedure

  1. From the main menu, select Help > Eclipse Marketplace.
  2. In Eclipse Marketplace, use the Find field to search for the wanted component, in this case CDT, and press Go.

    Eclipse Marketplace 2
  3. Click the Install button to start the installation and follow the instructions on the screen.

Additional resources

1.3. Starting Eclipse

1.3.1. Starting Eclipse from the GUI

To start Eclipse from the GUI, complete the following steps:

  • Click Applications > Programming > Red Hat Eclipse.

1.3.2. Starting Eclipse from the command line

To start Eclipse from the command line, type the following at a shell prompt:

  • On RHEL 7:

    $ scl enable rh-eclipse eclipse
  • On RHEL 8:

    $ eclipse

While starting, Eclipse prompts you to select a workspace directory for your projects. You can use ~/workspace/, the default option, or click Browse and select a custom directory. You can also select Use this as the default and do not ask again to prevent Eclipse from displaying this dialog box again. Click OK to confirm the selection and proceed with the start.

1.4. Eclipse Components

The Eclipse development environment is provided as a set of RPM packages. The set contains the following Eclipse components:

Table 1.1. Eclipse Components on RHEL 7

PackageDescription

rh-eclipse-eclipse-cdt

The C/C++ Development Tooling (CDT) toolkit provides features and plug-ins for development in these two languages.

rh-eclipse-eclipse-changelog

The ChangeLog plug-in enables you to create and maintain changelog files.

rh-eclipse-eclipse-egit

EGit, a team provider for Eclipse, provides features and plug-ins for interaction with Git repositories.

rh-eclipse-eclipse-emf

The Eclipse Modeling Framework (EMF) enables you to build applications based on a structured data model.

rh-eclipse-eclipse-gcov

The GCov plug-in integrates the GCov test coverage program with Eclipse.

rh-eclipse-eclipse-gef

The Graphical Editing Framework (GEF) enables you to create a rich graphical editor from an existing application model.

rh-eclipse-eclipse-gprof

The Gprof plug-in integrates the Gprof performance analysis utility with Eclipse.

rh-eclipse-eclipse-jdt

The Eclipse Java development tools (JDT) plug-in.

rh-eclipse-eclipse-jgit

JGit, a Java implementation of the Git revision control system.

rh-eclipse-eclipse-manpage

The Man Page plug-in enables you to view manual pages in Eclipse.

rh-eclipse-eclipse-mpc

The Eclipse Marketplace Client.

rh-eclipse-eclipse-pde

The Plugin Development Environment for developing Eclipse plug-ins.

rh-eclipse-eclipse-perf

The Perf plug-in integrates the perf tool with Eclipse.

rh-eclipse-eclipse-pydev

A full-featured Python IDE for Eclipse.

rh-eclipse-eclipse-remote

The Remote Services plug-in provides an extensible remote-services framework.

rh-eclipse-eclipse-rpm-editor

The Eclipse Spec File Editor enables you to maintain RPM spec files.

rh-eclipse-eclipse-systemtap

The SystemTap plug-in integrates SystemTap with Eclipse.

rh-eclipse-eclipse-subclipse

Subclipse, a team provider for Eclipse allows you to interact with Subversion repositories.

rh-eclipse-eclipse-valgrind

The Valgrind plug-in integrates Valgrind with Eclipse.

rh-eclipse-eclipse-webtools

The Eclipse Webtools plug-ins.

Table 1.2. Eclipse components on RHEL 8

PackageDescription

eclipse-emf

The Eclipse Modeling Framework (EMF) enables you to build applications based on a structured data model.

eclipse-jdt

The Eclipse Java development tools (JDT) plug-in.

eclipse-pde

The Plugin Development Environment for developing Eclipse plug-ins.

1.5. Additional resources

A detailed description of Eclipse and all its features is beyond the scope of this document. For more information, see the following resources.

Installed documentation

  • Eclipse includes a built-in help system that provides extensive documentation for each integrated feature and tool. It is accessible from Eclipse’s main menu: Help > Help Contents.

Other resources

Chapter 2. Changes in Eclipse 4.16

Eclipse 4.16 ships with Red Hat Developer Tools and plug-ins from the 2020-06 release train that provide a number of bug fixes and feature enhancements.

This section lists notable new features and compatibility changes in this release.

Table 2.1. Significant package updates on RHEL 7

eclipse 4.15 → 4.16

Eclipse IDE and JDT/PDE plug-ins have been updated to version 4.16. For a more complete list of changes, see the Eclipse 4.16 – New and Noteworthy page.

Notable enhancements include:

  • Java 14 is now supported by the Java Development Tooling (JDT). You can enable Java 14 preview features in the compiler preferences.
  • New code cleanup options and code formatting options for record types.
  • The integrated version of Apache Ant has been upgraded to version 1.10.8.
  • The integrated version of JUnit5 has been upgraded to version 5.6.2.
  • Improved presentation mode can now show invoked commands on a screen.
  • Look and feel updates for light and dark themes.

eclipse-cdt 9.11.0 → 9.11.1

The C/C++ Development Tooling has been updated to version 9.11.1. For details, see the upstream CDT 9.11.1 release notes.

  • This minor update includes various fixes for the terminal view, indexer, and a code formatter.

eclipse-linuxtools 7.6.0 → 7.7.0

The Linux Tools plug-ins have been updated to version 7.7.0. For details, see the upstream Linux Tools 7.7.0 release notes.

  • In this update, the Docker Tooling is no longer shipped with Linux Tools. If you need Docker support, you can install it from the Eclipse Marketplace.

eclipse-pydev 7.5.0 → 7.6.0

The PyDev plug-in has been updated to version 7.6.0, which introduces debugger improvements and adds support for Python 3.8 of Red Hat Software Collections (RHSCL). For details, see the upstream PyDev 7.6.0 release notes.

eclipse-egit/jgit 5.7.0 → 5.8.0

The Git integration plug-ins have been updated to version 5.8.0. For details, see the upstream EGit 5.8.0 release notes and JGit 5.8.0 release notes.

Notable changes include:

  • The Diff viewer outline has been improved.
  • In the Repositories view, you can now filter tags.
  • Support for cloning from local Git bundle files has been added.

eclipse-webtools 3.17.0 → 3.18.0

The Web Tools Platform has been updated to version 3.18.0. For details, see the upstream Web Tools Platform 3.18 – New and Noteworthy and Web Tools Platform 3.18 – New and Noteworthy pages.

Notable changes include:

  • Java 14 support has been added in faceted projects.
  • Editor look and feel customizations have been improved.

eclipse-m2e 1.15.0 → 1.16.0

The Maven integration plug-in has been updated to version 1.16.0.

Table 2.2. Significant package updates on RHEL 8

eclipse 4.15 → 4.16

Eclipse IDE and JDT/PDE plug-ins have been updated to version 4.16. For a more complete list of changes, see the Eclipse 4.16 – New and Noteworthy page.

Notable enhancements include:

  • Java 14 is now supported by the Java Development Tooling (JDT). You can enable Java 14 preview features in the compiler preferences.
  • New code cleanup options and code formatting options for record types.
  • The integrated version of Apache Ant has been upgraded to version 1.10.8.
  • The integrated version of JUnit5 has been upgraded to version 5.6.2.
  • Improved presentation mode can now show invoked commands on a screen.
  • Look and feel updates for light and dark themes.

Table 2.3. Deprecated functionality on RHEL 7

Docker Tooling plug-in

Docker Tooling is no longer shipped as part of the Linux Tools plug-in. If you need Docker support, you can install it from the Eclipse Marketplace.

Javascript Development Tools (JSDT)

JSDT is no longer shipped as part of the webtools component. To develop JavaScript projects, install Wild Web Developer from the Eclipse Marketplace.

Dali JPA Tools

Dali is no longer shipped as part of the webtools component. If you need JPA/Database support, you can install Dali from the Install New Software dialog.

Mylyn

The Mylyn Task-Focused UI is no longer shipped as part of Eclipse. If needed, install it from the Eclipse Marketplace.

Additional resources

For details on how to use the new features, see Eclipse Installed documentation.

Chapter 3. Known issues in Eclipse 4.16

This section details the known issues in Eclipse 4.16.

Table 3.1. Known issues on RHEL 7 and RHEL 8

Initializing Eclipse Error Reporting System error

This error occurs when running a workspace created in an older version of Eclipse.

To work around this problem, start Eclipse with the -clean option to clear its dependency resolution cache:

  • On RHEL 7:

    $ scl enable rh-eclipse "eclipse -clean"
  • On RHEL 8:

    $ eclipse -clean

Eclipse will start without this error message.

NullPointerExceptions

NullPointerExceptions can occur when you install a plug-in from a third-party update site. In that case, Eclipse fails to start with a NullPointerException in the workspace log file.

To work around this problem, restart Eclipse with the -clean option to clear its dependency resolution cache:

  • On RHEL 7:

    $ scl enable rh-eclipse "eclipse -clean"
  • On RHEL 8:

    $ eclipse -clean

Eclipse will start normally.

Table 3.2. Known issues on RHEL 7

Debuginfo package conflicts

When you install a debuginfo package for the Eclipse collection, such as rh-eclipse-eclipse-cdt-debuginfo, its contents may conflict with the same package from an earlier collection. As a result, the installation of the rh-eclipse debuginfo package may fail if the same debuginfo package from the rh-eclipse48 collection is installed.

To use debuginfo for the rh-eclipse collection, first uninstall the debuginfo packages from the rh-eclipse48 collection using this command:

$ yum remove rh-eclipse48*debuginfo

The installation of the debuginfo packages from the rh-eclipse collection will now succeed.

Conflicts between the RHSCL rh-maven33-scldevel and rh-maven35-scldevel packages

This conflict affects the optional rh-eclipse-scldevel package.

The rh-eclipse-scldevel and rh-eclipse46-scldevel packages cannot be present simultaneously.

The rh-eclipse-tycho package conflicts with the same package from earlier collections, for example: rh-eclipse48-tycho

As a result, the installation of the rh-eclipse-tycho package may fail when the rh-eclipse48-tycho package is already installed.

You only need Tycho if you want to build or rebuild Eclipse or its plug-ins need Tycho. If needed, uninstall the rh-eclipse48-tycho package before installing the rh-eclipse-tycho package using this command:

$ yum remove rh-eclipse48-tycho

The installation of the rh-eclipse-tycho package will now succeed.

PyDev users may experience issues with the pip integration

Modules that are pre-installed by the system or RHSCL Python cannot be uninstalled by pip. Attempts to do so will result in permission denied errors.

PyDev shortcut to manage Python modules does not work

Using the Ctrl+2 shortcut and selecting pip does not function properly. Attempts to use this shortcut therefore result in an SWTException in the workspace log.

Users can continue to manage their Python modules using the PyDev > Interpreters preference.

Incompatibilities between Eclipse Subclipse and base RHEL Subversion

Working copies of Subversion repositories created with Eclipse Subclipse are incompatible with the base RHEL version of Subversion. Using the svn command on such working copies may result in the following error:

$ svn up
svn: E155021: This client is too old to work with the working copy

To work around this problem, use the pure Java implementation of Subversion used by Eclipse Subclipse on the command line:

# yum install rh-eclipse-svnkit-cli # Command line support for SVNKit

Now, use the jsvn command anywhere you would normally use the svn command:

$ jsvn up
Updating '.':
At revision 16476.

Table 3.3. Known issues on RHEL 8

Eclipse and pki-deps modules are not installable in parallel

The Eclipse module and the pki-deps modules cannot be installed in parallel in RHEL 8.3.0 because they contain the same packages in different versions, which leads to conflict.

Eclipse profiles have been removed

The unused profiles c and everything have been removed from the Eclipse module.

To check whether you have the obsolete profiles installed, run:

# yum module list eclipse

The installed profiles have the [i] indicator next to their names.

To ensure that the Eclipse module contains the correct metadata, remove the unused profiles and reinstall the module with the java profile:

# yum module remove -y eclipse
# yum module reset -y eclipse
# yum clean all
# yum module -y install eclipse:rhel8/java

To install the Eclipse module from scratch, use the java profile:

# yum module -y install eclipse:rhel8/java

Legal Notice

Copyright © 2020 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.