Gentoo Wiki


Wikipedia has an article on:
Eclipse (software)

This article is mainly written by Elvanör (, the current maintainer of Eclipse on Gentoo. Thus "I" refer to myself, and "we" to the Java herd in general.


About Eclipse

Eclipse is a free software / open source platform-independent software framework for delivering what the project calls "rich-client applications", as opposed to "thin client" browser-based applications. So far this framework has typically been used to develop IDEs (Integrated Development Environments), such as the Java IDE called Java Development Toolkit (JDT) and compiler that comes as part of Eclipse (and which are also used to develop Eclipse itself). However, it can be used for other types of client application as well. If you want to learn more about Eclipse you should take a look at the project's website.

Eclipse in Gentoo

The Eclipse IDE is available on Gentoo via the portage package dev-util/eclipse-sdk. This package is the "classic" Eclipse distribution which includes the Eclipse platform itself, Eclipse plugin development tools, and Eclipse's Java Development Tools (JDT). Other tools and addons including IDEs for C++, PHP, Ruby and others can be easily obtained through Eclipse's Update and Addon manager which is accessible from the help menu. There is currently no plan in packaging these for Gentoo.

Eclipse series

The Gentoo Java team always tries to provide the latest version of Eclipse through the portage package. Due to the fact that Eclipse is a large product, the timeframe from a new Eclipse release till the point where it is provided in portage can be rather large.

Right now (2008-08-16) the stable version of Eclipse in portage is based on the 3.2 series (Callisto). Both 3.3 (Europa) and 3.4 (Ganymede) are also provided in the tree with the unstable keywords. The Gentoo Java Team will try to stabilize 3.3 as soon as possible and 3.4 after that. The 3.2 series will sooner or later disappear from the portage tree since the focus is now on 3.3, so a lot of the old 3.2 bugs will be only fixed in 3.3 or 3.4.

I know that the ebuild has been long coming to the main tree, mainly due to the fact that there was no dedicated maintainer until I became a Gentoo developer in early 2008. This is also due to the fact that a lot of work has been put in the ebuild, that should however on the long term make Eclipse more maintainable. See below for more information.

Eclipse 3.2 (Callisto)

Adding CDT Tools (or C/C++ IDE Plugin)

Instructions can be found within IBM's well written online article:

Eclipse 3.3 (Europa)

Eclipse 3.4 (Ganymede)


Add the "java-overlay" using layman. (Please help clarify this process for me!)

# emerge layman

# echo "source /usr/local/portage/layman/make.conf" >> /etc/make.conf

# layman --fetch

# layman --add java-overlay

After adding the java-overlay, unmask the following:

File: /etc/portage/package.keywords
# emerge eclipse-sdk

Adding CDT Tools (or C/C++ IDE Plugin)

A really nice thing about CDT Tools when comparing to Anjuta, after creating a simple Hello World project using one of the CDT templates, CDT would automatically build & debug with little hassle compared to using Anjuta's similar plugins. Hence, people just starting-out with Eclipse will get more coding done sooner then using Anjuta.

Once Eclipse-3.4 is installed, start Eclipse and go to the "Help" > "Software Updates" menu. Click "Available Software" tab and add the following site url:

Once added, check the tick box next to this entry and Eclipse will automatically query the server. (This might take awhile depending on the speed of your network connection, along with's bandwidth availability! Since site is stalling, I'm guessing the rest of this How To.)

After this, Eclipse should have a listing of available CDT related packages for installing. Check the tick box for the main CDT package/plugin and not the "Optional CDT Packages" (as you first have to install the main CDT package first), and select install.

You may have to restart Eclipse after CDT is installed.


I did run into one problem on the Welcome Screen of Eclipse. After clicking on "Getting started with C/C++ CDT" url, Eclipse failed with a complaint it could not start Epiphany or Mozilla (even though I had already configured Eclipse to use /usr/bin/firefox)!

The Eclipse ebuild depends on the dev-java/tomcat-servlet-api package, which in turn, requires virtual/jdk-1.4. If you want to avoid having to installing virtual/jdk-1.4, set the java5 USE flag on dev-java/tomcat-servlet-api, which will alter the dependency to >=virtual/jdk-1.5.

Extensions in Eclipse

Eclipse is extended through features and plugins. Features are a collection of one or more plugins. We use the term extension as an abstraction over both, when the difference is irrelevant.

Installing new extensions

Currently the recommended way of installing extensions is to use the integrated Update Manager by selecting Help -> Software Updates -> Find and Install (3.2 and 3.3) or Help -> Software Updates ... (3.4) within Eclipse. With that mechanism you are free to install plugins and features to your home directory. In fact, you can install extensions wherever your user has write permissions, subject to some rules:

Using extensions installed by Portage

Currently, all extensions compiled from source code are automatically available in your workspace (on next restart of Eclipse if you merged new extensions while Eclipse was running).

Details on extensions

The features and plugins managed by Portage, however, will be installed in fixed locations.

All extensions that are compiled entirely from source code will be installed into the main Eclipse library, located in /usr/lib/eclipse-2 (or -3) or /usr/lib/eclipse-extensions-2 (or -3).

All extensions where the .jar files are installed as-is, so-called binary packages, will be installed into /opt/eclipse-extensions-2 (or -3).

(I'm not seeing any so-called /opt/eclipse* folders. Please Update for Eclipse-3.4!!)

This means that any from-source extension will be automatically available inside your Eclipse environment, but you must explicitly link the directory /opt/eclipse-extensions-2 into your workspace using the Update Manager if you want to avail yourself of the binary extensions. Go to Help->Software Updates->Manage configuration and add /opt/eclipse-extensions-2 as an extension location.

This linking only needs to be done once for every workspace. New binaries will automatically show up when merged after the initial link has been set up.

Reporting bugs

If you decide to report a bug upstream with the Eclipse project, you should make certain that:

Problems and Solutions

Eclipse is slow, or very unstable (Out Of Memory crashes)
This most likely means that you need to increase the memory allowed to Eclipse. Edit /etc/eclipserc and change some variables. This is especially needed if you are on amd64, or use a lot of Eclipse plugins. Note that if given enough RAM, Eclipse should *not* be slow. However, it will always be slower on amd64 than on x86, as Sun unfortunately does not provide a 64-bit client mode JVM, so everything is ran in server mode which is not adapted to applications such as Eclipse.
Printing does not work in Eclipse
Rebuild swt with the cairo USE flag set.
Embedded browser does not work in Eclipse
See | The eclipse faq.
Basically just build dev-java/swt with the xulrunner flag (this will pull xulrunner), and upgrade to Eclipse 3.3 or newer.
Method for older versions that didn't work for me (Can someone provide more details on that or confirm that it works please?):
Ensure MOZILLA_FIVE_HOME is set correctly (Example: /usr/lib/seamonkey or /usr/lib64/xulrunner) and rebuild dev-java/swt with the correct USE flag set (firefox, seamonkey, xulrunner).
Eclipse hits 100% CPU usage and freezes on start-up with GTK GUI 
Tune down your CFLAGS. In particular, do not use -msse and/or -msse2
Javadoc Tooltip 
To get the Javadoc Tooltips goto Window->Preferences->Java->Installed JREs->edit, mark rt.jar and attach the source : /opt/sun-jdk- or the appropriate.
Docs error 
Eclipse assumes you have Mozilla installed and I use Opera. I couldn't find a way (config file or such) to change the default so I simply created a link mozilla > opera.
# cd /usr/bin/
# link opera mozilla
Regular JVM crash with 64 bits Sun JDK in org.eclipse.core.internal.dtree.DataTreeNode.forwardDeltaWith

This is a bug in the Sun JVM. See and You can install a 32 bits eclipse version, emerge app-emulation/emul-linux-x86-java and choose "Sun 32bit JRE [emul-linux-x86-java-1.6]" using java-config

"Cannot launch the Update UI. This installation has not been configured properly for Software Updates" error with Eclipse 3.4
it seems the new update UI is not built due to some profiling issues with the current P2 sources however you can use the 'classic' update module via Window>Preferences>General>Capabilities>Classic Update. For more information see and Alternatively you could try the java-overlay build via Layman which has the P2 update module working
java.lang.UnsatisfiedLinkError, no swt-gtk-3448 or swt-gtk in swt.library.path, java.library.path or the jar file, at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)

Sometimes Eclipse can't find /usr/lib/ To solve that, edit /usr/lib/eclipse-3.4/configuration/config.ini and add the following:



Retrieved from ""

Last modified: Tue, 14 Oct 2008 04:22:00 +0000 Hits: 54,687