-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat Developer Tools
Using Eclipse
Installing Eclipse 4.11.0 and first steps with the application
Robin Owen
kowen@redhat.com
devtools-docs@redhat.com
Abstract
Chapter 1. Eclipse 4.11.0
Red Hat Developer Tools, available for Red Hat Enterprise Linux 7, includes Eclipse 4.11.0, which is based on the Eclipse Foundation’s 2019-03 release train. Note that the rh-eclipse
collection requires the rh-maven35
collection.
Eclipse is a powerful development environment that provides tools for each phase of the development process. It integrates a variety of disparate tools into a unified environment to create a rich development experience, provides a fully configurable user interface, and features a pluggable architecture that allows for extension in a variety of ways. For instance, the Valgrind plug-in allows programmers to perform memory profiling, that is otherwise performed on the command line through the Eclipse user interface.
Figure 1.1. Sample Eclipse Session
Eclipse provides a graphical development environment alternative to traditional interaction with command-line tools, and it is a welcome alternative for developers who do not want to use the command-line interface. The traditional, mostly command-line-based Linux tools (such as gcc
or gdb
) and Eclipse offer two distinct approaches to programming.
For an overview on how to develop applications for Red Hat JBoss Middleware or for support for OpenShift Tools, see Red Hat Developer Studio.
Table 1.1. Eclipse Components Included in rh-eclipse
Package | Description |
---|---|
| The C/C++ Development Tooling (CDT) that provides features and plug-ins for development in these two languages. |
| The ChangeLog plug-in that allows you to create and maintain changelog files. |
| Eclipse Data Tools Platform Project |
| EGit, a team provider for Eclipse that provides features and plug-ins for interaction with Git repositories. |
| The Eclipse Modeling Framework (EMF) that allows you to build applications based on a structured data model. |
| The Eclipse error reporting tool. |
| The GCov plug-in that integrates the GCov test coverage program with Eclipse. |
| The Graphical Editing Framework (GEF) that allows you to create a rich graphical editor from an existing application model. |
| The Gprof plug-in that 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 that allows you to view manual pages in Eclipse. |
| The Eclipse Marketplace Client. |
| Mylyn, a task management system for Eclipse. |
| The OProfile plug-in that integrates OProfile with Eclipse. |
| The Plugin Development Environment for developing Eclipse plugins. |
| The Perf plug-in that integrates the perf tool with Eclipse. |
| A subset of the PTP project that provides support for synchronized projects. |
| A full featured Python IDE for Eclipse. |
| The Remote Services plug-in that provides an extensible remote-services framework. |
| The Eclipse Spec File Editor that allows you to maintain RPM spec files. |
| The Remote System Explorer (RSE) framework that allows you to work with remote systems from Eclipse. |
| The SystemTap plug-in that integrates SystemTap with Eclipse. |
| Subclipse, a team provider for Eclipse that provides features and plug-ins for interaction with Subversion repositories. |
| The Valgrind plug-in that integrates Valgrind with Eclipse. |
| The Eclipse Webtools plug-ins. |
1.1. Getting Access to Eclipse on Red Hat Enterprise Linux 7
Eclipse is an offering that is distributed as a part of the Red Hat Developer Tools content set, which is available to customers with deployments of Red Hat Enterprise Linux 7. In order to install Eclipse, enable the Red Hat Developer Tools and Red Hat Software Collections repositories by using the Red Hat Subscription Management.
Choose the system variant:
workstation
orserver
and modify the following commands:NoteWe recommend developers to use Red Hat Enterprise Linux Server for access to the widest range of development tools.
Enable the
rhel-7-variant-devtools-rpms
repository:# subscription-manager repos --enable rhel-7-variant-devtools-rpms
Enable the
rhel-variant-rhscl-7-rpms
repository:# subscription-manager repos --enable rhel-variant-rhscl-7-rpms
Enable the
rhel-7-variant-optional-rpms
repository:# subscription-manager repos --enable rhel-7-variant-optional-rpms
Repositories are enabled. You can install Red Hat Eclipse as described in Section 1.2, “Installing Eclipse”.
Enabling the Red Hat Developer Tools debuginfo Repositories
This step is optional.
Red Hat Developer Tools also provides the debuginfo
packages for all architecture-dependent RPMs included in the repositories. These packages are useful for core-file analysis and for debugging of Eclipse itself.
Enable the Red Hat Developer Tools
debuginfo
repositories, replace variant with the Red Hat Enterprise Linux system variant (server
orworkstation
):# subscription-manager repos --enable rhel-7-variant-devtools-debug-rpms # subscription-manager repos --enable rhel-variant-rhscl-7-debug-rpms
For details about installing, understanding, and using the debuginfo
packages, refer to Debugging a Running Application.
Additional Resources
- For more information on how to register your system using Red Hat Subscription Management and associate it with subscriptions, see the Red Hat Subscription Management collection of guides.
- For detailed instructions on 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 Eclipse development environment is provided as a collection of RPM packages.
To install Eclipse, run the following commands as the
root
user:# yum install rh-eclipse
For a list of available components, see Table 1.1, “Eclipse Components Included in rh-eclipse”.
rh-eclipse
fully supports C, C++, and Java development, but it does not provide support for the Fortran programming language.
1.3. Using Eclipse
To start rh-eclipse
:
Click Applications > Programming > Red Hat Eclipse, or type the following at a shell prompt:
$ scl enable rh-eclipse eclipse
-
During its startup, Eclipse prompts you to select a workspace that is a directory in which you want to store your projects. You can either use
~/workspace/
, which is the default option, or click Browse to browse your file system and select a custom directory. Additionally, you can select the Use this as the default and do not ask again check box to prevent Eclipse from displaying this dialog box the next time you run this development environment. - Click OK to confirm the selection and proceed with the startup.
1.3.1. Using the Red Hat Developer Toolset Toolchain
To use rh-eclipse
with support for the GNU Compiler Collection and binutils
from Red Hat Developer Toolset:
-
Ensure that
devtoolset-8-toolchain
is installed and run the application as described in Section 1.3, “Using Eclipse”. Therh-eclipse
collection uses the Red Hat Developer Toolset toolchain by default.
For detailed instructions on how to install the devtoolset-8-toolchain
package on your system, see the Red Hat Developer Toolset User Guide Section 1.5. Installing Red Hat Developer Toolset.
Discard all previous build results for projects previously built with the Red Hat Enterprise Linux version of the GNU Compiler Collection. To do so, open the project in Eclipse and select Project > Clean from the menu.
1.3.2. Using the Red Hat Enterprise Linux Toolchain
To use rh-eclipse
with support for the toolchain distributed with Red Hat Enterprise Linux, change the configuration of the project to use absolute paths to the Red Hat Enterprise Linux system versions of gcc
, g++
, and as
.
To configure Eclipse to explicitly use the Red Hat Enterprise Linux system versions of the tools for the current project:
- In the C/C++ perspective, click Project > Properties to open the project properties.
- In the menu on the left-hand side of the dialog box, click C/C++ Build > Settings.
- Click the Tool Settings tab.
If you are working on a C project:
Select GCC C Compiler or Cross GCC Compiler and change the value of the Command field to:
/usr/bin/gcc
Select GCC C Linker or Cross GCC Linker and change the value of the Command field to:
/usr/bin/gcc
Select GCC Assembler or Cross GCC Assembler and change the value of the Command field to:
/usr/bin/as
If you are working on a C++ project:
Select GCC C Compiler* or *Cross G Compiler and change the value of the Command field to:
/usr/bin/g++
Select GCC C Compiler or Cross GCC Compiler and change the value of the Command field to:
/usr/bin/gcc
Select GCC C Linker* or *Cross G Linker and change the value of the Command field to:
/usr/bin/g++
Select GCC Assembler or Cross GCC Assembler and change the value of the Command field to:
/usr/bin/as
- Click OK to save the configuration changes.
1.4. 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.
See Also
- Chapter 2, Changes Since Developer Tools 2019.1 provides a list of selected features and improvements over the Eclipse development environment included in the previous release of Developer Tools.
- The Red Hat Developer Toolset chapter in the User Guide provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- The GNU Compiler Collection (GCC) chapter in the User Guide provides information on how to compile programs written in C, C++, and Fortran on the command line.
Chapter 2. Changes Since Developer Tools 2019.1
Red Hat Developer Tools is distributed with Eclipse 4.11.0 and other plug-ins from the 2019-03 release train which provide a number of bug fixes and feature enhancements over that distributed in Red Hat Developer Tools 2019.1. The following is an abridged list of new features and compatibility changes in this release. For details on how to use these new features, see the built-in Eclipse documentation.
Dependencies
The rh-eclipse
collection depends on the rh-maven35
collection. RHEL 7.6 is recommended for the best possible experience.
Significant Package Updates
-
The
rh-eclipse
collection has removed theeclipse-recommenders
plug-in. Some of the functionality of this plug-in is being moved to the main JDT project. eclipse
4.10.0 → 4.11.0: Eclipse Platform JDT/PDE plug-ins were updated to 4.11.0. The highlights include:- General performance and usability enhancements, including a better first-time user experience.
- Support for JUnit 5.4.0.
Improved content assist for Java editors and the Java code formatter.
For details, see the upstream release notes at https://www.eclipse.org/eclipse/news/4.11/.
eclipse-cdt
9.6.0 → 9.7.0: The CDT plug-ins have been updated to 9.7.0 to bring improvements to static analysis and the C/C++ code formatter.For details, see the upstream release notes at https://wiki.eclipse.org/CDT/User/NewIn97.
eclipse-linuxtools
7.1.0 → 7.2.0: The Linuxtools plug-ins have been updated to 7.2.0, fixing bugs in the Docker tooling.For details, see the upstream release notes at https://projects.eclipse.org/projects/tools.linuxtools/releases/7.2.0/bugs.
eclipse-m2e-core
1.10.0 → 1.11.0: Eclipse Maven integration was updated to 1.11.0, fixing various bugs.For details, see the upstream release notes at https://projects.eclipse.org/projects/technology.m2e/releases/1.11.0/bugs.
eclipse-webtools
3.12.0 → 3.13.0: The Webtools plug-ins were updated 3.13.0, fixing various bugs.For details, see the upstream release notes at https://projects.eclipse.org/projects/webtools/releases/3.13/bugs.
eclipse-pydev
7.0.3 → 7.1.0: The Pydev plug-in was updated to 7.1.0, fixing various bugs.For details, see the upstream release notes: http://www.pydev.org/history_pydev.html.
eclipse-testng
6.14.0 → 6.14.3: The TestNG integration was updated to 6.14.3 to bring support for TestNG 7 and better JPMS support.For details, see the upstream release notes at https://github.com/cbeust/testng-eclipse/blob/6.14.3.201902250526/CHANGES.md.
eclipse-egit
/eclipse-jgit
5.2.0 → 5.3.0: The Git integration plug-ins were updated to 5.3.0 to add usability and performance improvements, including the following:- Support for GPG signing commits using Bouncycastle.
Support for ED25519 SSH keys using the Apache Mina SSH provider.
For details, see the upstream release notes at https://projects.eclipse.org/projects/technology.jgit/releases/5.3.0 and https://projects.eclipse.org/projects/technology.egit/releases/5.3.0.
Chapter 3. Known Issues in Eclipse 4.11.0
This section details the known issues in Eclipse 4.11.0.
3.1. Eclipse hangs on startup
Cause: Eclipse can hang on startup due to a thread deadlock.
Consequence: Only the Eclipse splashscreen is shown without displaying the workspace selection dialog.
Workaround: Kill the offending Eclipse process by finding its PID and sending the process a kill signal. Example:
$ jps 30066 Jps 31631 org.eclipse.equinox.launcher_1.5.300.v20190308-0658.jar $ kill 31631
Result: Once the offending process has been killed, Eclipse can be restarted normally.
3.2. NullPointerException with some plug-ins from third-party sources
When a plug-in from a third-party update site is installed, Eclipse sometimes fails to start with a NullPointerException
in the workspace log file.
Workaround: Restart Eclipse with the -clean
option to clear its dependency resolution cache. For example:
$ scl enable rh-eclipse "eclipse -clean"
Result: Eclipse will start up normally.
3.3. Debuginfo Conflicts
Cause: When a user attempts to install a debuginfo
package for this collection, for example: rh-eclipse-eclipse-cdt-debuginfo
, the contents may conflict with the same packages from the earlier collections.
Consequence: The installation of the rh-eclipse debuginfo
package may fail if the same debuginfo
package from the rh-eclipse48
collection is installed.
Workaround: To use debuginfo
for the rh-eclipse
collection, debuginfo
packages from the rh-eclipse48
collection should first be uninstalled using the command yum remove rh-eclipse48*debuginfo
.
Result: The installation of the debuginfo
packages from the rh-eclipse
collection is successful.
3.4. Conflict between the RHSCL rh-maven33-scldevel
and rh-maven35-scldevel
packages
There is a conflict between the RHSCL rh-maven33-scldevel
and rh-maven35-scldevel
packages. This affects the rh-eclipse-scldevel
package (note that this package is not installed by default).
The rh-eclipse-scldevel
and rh-eclipse46-scldevel
packages cannot be present simultaneously.
3.5. PyDev users may experience issues with the pip
integration
Modules that are pre-installed by the Python SCL cannot be uninstalled; attempts to do so will result in permission denied errors.
3.6. PyDev shortcut to manage Python modules does not work
Using the Ctrl+2 shortcut and selecting pip
does not function properly.
Consequence: Attempts to use this shortcut result in an SWTException
in the workspace log.
Workaround: Users can continue to manage their Python modules using the PyDev > Interpreters preference.
3.7. 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
Workaround: 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.
3.8. Tycho Conflicts
Cause: The rh-eclipse-tycho
package conflicts with the same package from the earlier collections, for example: rh-eclipse48-tycho
.
Consequence: The installation of rh-eclipse-tycho
package may fail when the rh-eclipse48-tycho
package is already installed.
Workaround: Note that only users that want to build or re-build Eclipse or its plug-ins need tycho. If needed, uninstall the rh-eclipse48-tycho
package using the yum remove rh-eclipse48-tycho
command before attempting to install the rh-eclipse-tycho
package.
Result: The installation of the rh-eclipse-tycho
package is successful.