zh-CN:Eclipse Eclipse is an open source community project, which aims to provide a universal development platform. The Eclipse project is most widely known for its cross-platform integrated development environment (IDE). The Arch Linux packages (and this guide) relate specifically to the IDE.
The Eclipse IDE is largely written in Java but can be used to develop applications in a number of languages, including Java, C/C++, PHP, Perl and Python. The IDE can also provide subversion support and task management.
- 1 Installation
- 2 Plugins
- 3 Enable javadoc integration
- 4 Troubleshooting
- 4.1 Autocompletion and javadoc render crash
- 4.2 Crash on first boot or when choosing Help > Welcome
- 4.3 Ctrl+X closes Eclipse
- 4.4 Eclipse 4.2.0 not respecting dark/custom gtk themes resulting in white background
- 4.5 Tooltips have dark background color with Gnome 3.6 Adwaita theme
- 4.6 Toggle buttons states are the same for selected/not selected
- 5 See also
Many plugins are easily installed using pacman (see Eclipse plugin package guidelines for further informations). This will also keep them up-to-date. You can choose the internal #plugin manager as alternative.
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. Make sure that you first add the default update site for your installed version of Eclipse so that plugin dependencies can automatically be installed. The most current version of Eclipse is Juno and the default update site for Juno is: http://download.eclipse.org/releases/juno.
- 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/share/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 wouldn't 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.2 (Juno), check you have enabled this repository:
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
- http://www.aptana.com/ || AUR AUR
- Eclipse CDT — C/C++ support.
- Eclipse PDT — PHP support.
- http://www.eclipse.org/pdt/ || AUR
- EGit — Git support.
- http://www.eclipse.org/egit || AUR
- EPIC — Perl support.
- http://www.epic-ide.org/ || AUR
- MercurialEclipse — Mercurial support.
- Mylyn — Task lists support.
- PHPEclipse — Alternative PHP support.
- http://www.phpeclipse.com/ || AUR
- PyDev — Python support.
- http://pydev.org/ || AUR
- Subclipse — Subversion support.
- http://subclipse.tigris.org/ || AUR
- Subversive — Alternative Subversion support.
- TeXlipse — LaTeX support.
Enable javadoc integration
Want to see API entries when hovering the mouse pointer over standard Java methods?
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
/opt/java/jre/lib/rt.jaritem under "JRE system libraries:", then click Javadoc Location....
- Enter "http://docs.oracle.com/javase/7/docs/api/" in the "Javadoc location path:" text field.
If you have no internet connection on your development machine or do not want to constantly consume bandwidth for the documentation, you can store the documentation locally, by installing thepackage. Eclipse should find the javadocs automatically.
Autocompletion and javadoc render crash
For some reason, libxul may crash Eclipse with a traceback like:
# Problematic frame: # C [libxul.so+0xd07552] NS_InvokeByIndex_P+0x5e9a
To fix this issue, you can try installing
If that does not work (or if you do not want to use libwebkit) try this:
- Download http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/22.214.171.124/runtimes/xulrunner-126.96.36.199.en-US.linux-i686.tar.bz2.
- Unpack it into
~/.xulrunner(or another location).
- Add this line to your Eclipse configuration file
Now everything should just work fine and tooltips should display correctly.
Crash on first boot or when choosing Help > Welcome
Ctrl+X closes Eclipse
Eclipse 4.2.0 not respecting dark/custom gtk themes resulting in white background
Remove or move to backup sub folder all of the .css files from: /usr/share/eclipse/plugins/org.eclipse.platform_4.2.0.v201206081400/css/
Solution source: http://www.eclipse.org/forums/index.php/m/872214/
Tooltips have dark background color with Gnome 3.6 Adwaita theme
Comment out the second-to-last line in
/usr/share/themes/Adwaita/gtk-2.0/gtkrc like this
#widget "gtk-tooltip*" style "tooltips"
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=381010 (WONTFIX)
Comment out the last line in
/usr/share/themes/Adwaita/gtk-2.0/gtkrc like this
#widget "*swt*toolbar*" style "null"
To apply the fixed theme, use
gnome-tweak-tool to select a different theme and cycle back to Adwaita.