Skip to content

Setting Up Eclipse

Endi S. Dewata edited this page Apr 28, 2021 · 26 revisions

Installation

To install Eclipse on Fedora:

$ dnf install eclipse-jdt

It will add an icon in the desktop’s Favorites.

Starting Eclipse

To start Eclipse, click the Eclipse icon in the desktop’s Favorites or execute the following command:

$ eclipse

It may ask you to select a workspace to store project metadata.

Adding a Java Project

To add the Java project into Eclipse, first clone the project into a local repository, for example:

$ git clone [email protected]:dogtagpki/pki.git

Install the build dependencies, for example:

$ dnf builddep pki-core

Then execute the following steps in Eclipse:

  • Click FileNewJava Project.

  • Enter the Project name, e.g. pki.

  • Uncheck Use default location.

  • In Location enter the path to the cloned project repository, e.g. /home/<username>/Projects/pki.

  • Click Finish.

If the project already has the .project and .classpath files in the project’s main folder, the project build path is already set up so Eclipse can build the code automatically, and there should be no errors. The project can be used immediately.

If the project doesn’t have the .project and .classpath files, it may be necessary to configure the project build path manually before the project can be used.

Troubleshooting

Eclipse Keeps Crashing

If Eclipse keeps crashing on start, try removing the ~/.eclipse folder. It’s not necessary to remove the workspace folder.

Missing JRE System Library

The following error message may appear after upgrading Java:

The container 'JRE System Library [...]' references non existing library '...'

To fix the problem, try restarting Eclipse.

If the problem persists, try the following steps:

  • Open ProjectPropertiesJava Build PathLibraries.

  • Select JRE System Library.

  • Click Remove.

  • Click Add Library…​.

  • Select JRE System Library.

  • Select Workspace default JRE.

  • Click Finish.

  • Click Apply and Close.

Clone this wiki locally