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
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.
Enable the
rhel-7-variant-devtools-rpms
repository to access Red Hat Developer Tools:# subscription-manager repos --enable rhel-7-variant-devtools-rpms
Enable the
rhel-variant-rhscl-7-rpms
repository to acces Red Hat Software Collections:# subscription-manager repos --enable rhel-variant-rhscl-7-rpms
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
orworkstation
):# 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
-
For details on installing, understanding, and using the
debuginfo
packages, refer to Debugging a Running Application. - 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.
- For detailed instructions on managing a subscription to Red Hat Software Collections, see the Red Hat Developer Toolset User Guide Section 1.4. Getting Access to Red Hat Developer Toolset.
1.2. Installing Eclipse
The following section describes how to install Eclipse.
Prerequisites
- Eclipse is available only on the AMD64 and Intel 64 architecture.
- On RHEL 7, the repositories must be enabled as per Section 1.1, “Enabling access to Eclipse RPMs on Red Hat Enterprise Linux 7”.
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
- To use the Install New Software wizard for the installation of additional components, in the main menu click Help > Install New Software and follow the instructions on the screen.
- To use the Marketplace Client for the installation of additional components, follow the instructions in Section 1.2.1.1, “Example: Installing C and C++ Development Tooling (CDT) using the Eclipse Marketplace Client”.
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.
- 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
- From the main menu, select Help > Eclipse Marketplace.
In Eclipse Marketplace, use the Find field to search for the wanted component, in this case CDT, and press Go.
- Click the Install button to start the installation and follow the instructions on the screen.
Additional resources
- For a list of available components, see Section 1.4, “Eclipse Components”.
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:
Package | Description |
---|---|
| The C/C++ Development Tooling (CDT) toolkit provides features and plug-ins for development in these two languages. |
| The ChangeLog plug-in enables you to create and maintain changelog files. |
| EGit, a team provider for Eclipse, provides features and plug-ins for interaction with Git repositories. |
| The Eclipse Modeling Framework (EMF) enables you to build applications based on a structured data model. |
| The GCov plug-in integrates the GCov test coverage program with Eclipse. |
| The Graphical Editing Framework (GEF) enables you to create a rich graphical editor from an existing application model. |
| The Gprof plug-in integrates the Gprof performance analysis utility with Eclipse. |
| The Eclipse Java development tools (JDT) plug-in. |
| JGit, a Java implementation of the Git revision control system. |
| The Man Page plug-in enables you to view manual pages in Eclipse. |
| The Eclipse Marketplace Client. |
| The Plugin Development Environment for developing Eclipse plug-ins. |
| The Perf plug-in integrates the perf tool with Eclipse. |
| A full-featured Python IDE for Eclipse. |
| The Remote Services plug-in provides an extensible remote-services framework. |
| The Eclipse Spec File Editor enables you to maintain RPM spec files. |
| The SystemTap plug-in integrates SystemTap with Eclipse. |
| Subclipse, a team provider for Eclipse allows you to interact with Subversion repositories. |
| The Valgrind plug-in integrates Valgrind with Eclipse. |
| The Eclipse Webtools plug-ins. |
Package | Description |
---|---|
| The Eclipse Modeling Framework (EMF) enables you to build applications based on a structured data model. |
| The Eclipse Java development tools (JDT) plug-in. |
| 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
- For a list of selected features and improvements in the latest version of the Eclipse development environment, see Chapter 2, Changes in Eclipse 4.16.