Eclipse

Related articles
IDE#Java IDEs
Eclipse
it is an open source community project aimed at providing a universal development platform. The Eclipse project is best known for its multiplatform integrated development environment (IDE). Arch Linux packages (and this guide) are specifically related to the IDE.
Eclipse IDE is largely written in Java, but can be used to develop applications in many languages, including Java, C / C++, PHP, Perl, Rust and Python. The IDE can also provide subversion support and task management.
Installation
Install
one of the following packages:
eclipse-jee-bin
AUR
for Java EE Developers
eclipse-java-bin
AUR
for Java Developers
eclipse-rcp-bin
AUR
for RCP and RAP Developers
eclipse-cpp-bin
AUR
for C/C++ Developers
eclipse-php-bin
AUR
for PHP Developers
eclipse-dsl-bin
AUR
for DSL Developers
eclipse-platform
AUR
for a base platform suitable for complete per-user customization with the built-in Eclipse package manager
You cannot install several of them at the same time as they conflict, see
FS#45577
: choose the package above which meets your needs immediately and add support for the additional languages you need through
#Plugins
.
Plugins
Many plugins are easily installed using
pacman
(look
Eclipse plugin package guidelines
for more information). This will also keep them updated. Alternatively, you can choose the
Eclipse Marketplace
or the internal
plugin manager
.
Add the default update site
Be sure to verify that the default update site for your version of Eclipse is configured so that plug-in dependencies can be installed automatically. Recent versions of Eclipse should already have the default update site set properly. To verify or update, go to
Help > Install New Software
. The drop-down list for the field labeled as
Work with:
should list an option named Eclipse Repository with a site that looks like
https://download.eclipse.org/releases/2021-09
(for example for version 2021-09). If a default site is not available, you can choose
Add
to add one. You can find sites for recent versions under
https://download.eclipse.org/releases/
. To check your Eclipse version go to
Help > About Eclipse Platform
(or any
About
option available in your installation).
Eclipse Marketplace
Note
make sure you have followed the
Add the default update site
section.
To use the Eclipse Marketplace, install it, go to
Help > Install new software
then, switch to the default update site in the
Work with
section and go to
General Purpose Tools > Marketplace Client
. Select it, click next, and follow the instructions until you finish. Restart Eclipse and it will be available in
Help > Eclipse Marketplace
.
Plugin manager
Note
make sure you have followed the
Add the default update site
section.
Use Eclipse's plugin manager to download and install plugins from their original repositories: in this case you have to find the needed repository in the plugin's website, then go to
Help > Install New Software...
, enter the repository in the
Work with
field, select the plugin to install from the list below and follow the instructions.
Note
If you install plugins with Eclipse's plugin manager, you are advised to launch Eclipse as root: this way the plugins will be installed in
/usr/lib/eclipse/plugins/
; if you installed them as normal user, they would be stored in a version-dependent folder inside
~/.eclipse/
, and, after upgrading Eclipse, they would not be recognized any longer.
Do not use Eclipse as root for your everyday work.
Updates via plugin manager
Run Eclipse and select
Help > Check for Updates
. If you have installed them as root as advised in the section above, you have to run Eclipse as root.
For plugins to be updated, you should check to have their update repositories enabled in
Window > Preferences > Install/Update > Available Software Sites
: you can find each plugin's repository(es) on the respective project website. To add, edit, remove... repositories just use the buttons on the right of the
Available Software Sites
panel. For Eclipse 4.5 (Mars), check you have enabled this repository:
https://download.eclipse.org/releases/mars
To receive update notifications, go to
Window > Preferences > Install/Update > Automatic Updates
. If you want to receive notifications for plugins installed as root, you should run Eclipse as root, go to
Window > Preferences > Install/Update > Available Software Sites
, select the repositories related to the installed plugins and
Export
them, then run Eclipse as normal user and
Import
them in the same panel.
List of plugins
AVR
— AVR microcontroller plugin.
https://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_Eclipse_Plugin
[
dead link
2023-09-16—HTTP 404]
||
eclipse-avr
AUR
Markdown
— Markdown editor plugin for Eclipse.
https://www.winterwell.com/software/markdown-editor.php
||
eclipse-markdown
AUR
PyDev
—
Python
support.
http://pydev.org/
||
eclipse-pydev
AUR
Subclipse
—
Subversion
support.
https://github.com/subclipse/subclipse
||
eclipse-subclipse
AUR
SWTBot
— Standard Widget Toolkit UI testing
https://www.eclipse.org/swtbot
||
eclipse-swtbot
AUR
TestNG
— TestNG support.
https://testng.org/
||
eclipse-testng
AUR
TeXlipse
—
LaTeX
support.
https://texlipse.sourceforge.net/
||
eclipse-texlipse
AUR
Checkstyle
— Eclipse Checkstyle support.
https://eclipse-cs.sourceforge.net/
||
eclipse-checkstyle
AUR
Spring Tools
— Spring Tool Suite (STS)
https://spring.io/tools
||
spring-tools-for-eclipse
AUR
SpotBugs
— static code analysis
https://spotbugs.github.io/
||
eclipse-spotbugs
AUR
List of standalone extensions
Aptana
— HTML5/CSS3/JavaScript/Ruby/Rails/PHP/Pydev/Django support.
https://www.aptana.com/
||
aptana-studio
AUR
RCPTT
— Eclipse RCP UI testing tool
https://eclipse.dev/rcptt/
||
eclipse-rcptt-bin
AUR
Papyrus
— UML modelling tool
https://eclipse.dev/papyrus/
||
papyrus
AUR
Enable javadoc integration
Enabling the javadoc integration allows you to see documentation on methods and classes when you hover over them with your mouse.
Online version
If you have constant Internet access on your machine, you can use the on-line documentation:
Go to
Window > Preferences
, then go to
Java > Installed JREs
.
There should be one named "java" with the type "Standard VM". Select this and click
Edit
.
Select the
/usr/lib/jvm/java-8-openjdka/jre/lib/rt.jar
item under "JRE system libraries:", then click
Javadoc Location...
.
Enter "
https://docs.oracle.com/javase/8/docs/api/
" in the "Javadoc location path:" text field.
Note
On slow internet connections, fetching of javadocs from the internet could take some time, consider
offline versions
.
On metered internet connections, fetching javadocs from the internet could run you up a large internet bill at the end of the month, consider
offline versions
.
Offline version
You can store the documentation locally by installing the
openjdk8-doc
package.  Eclipse may be able to find the javadocs automatically.  If that does not work, set Javadoc location for rt.jar to
file:/usr/share/doc/java8-openjdk/api
.
Troubleshooting
Dark theme
Eclipse supplies a Dark theme which can be enabled in
Window > Preferences > General > Appearance
and selecting the
Dark
theme.
The dark theme uses its own colours rather than the GTK theme colours, if you prefer it to fully respect GTK colour settings, then remove or move to backup sub folder all of the .css files from
/usr/lib/eclipse/plugins/org.eclipse.ui.themes_
version
/css/
, replacing the
version
with the appropriate version number.
Change Default Window Title Font Size
You cannot change the window title font size using the Eclipse preferences, you must edit the actual theme .css files. These are located under
/usr/lib/eclipse/plugins/org.eclipse.themes_
version
/css/
directory, where
version
is the actual theme version number.
Use a
text editor
to edit the appropriate file, e.g.
e4_default_gtk.css
if you are using the "GTK theme".
In this file, search for
.MPartStack
, and change the font-size to your desired size:
.MPartStack {
       font-size: 9;
       swt-simple: false;
       swt-mru-visible: false;
}
Note
This needs to be redone whenever eclipse is upgraded.
Freshplayerplugin
Eclipse is not compatible with
freshplayerplugin
AUR
. See
https://github.com/i-rinat/freshplayerplugin/issues/298
.
Show in System Explorer does not work
See
this
guide. Go to
Window > Preferences > General > Workspace
and change the command launching system explorer. As
Xfce
user you may like to change it to
thunar ${selected_resource_uri}
to open the selected folder with thunar.