Difference between revisions of "Eclipse"

From ArchWiki
Jump to: navigation, search
m (Using Sun JDK in place of OpenJDK: see talk page)
(Plugins: see talk page)
Line 13: Line 13:
  
 
== Plugins ==
 
== Plugins ==
 +
{{Warning|
 +
*If you want to install some plugins with Eclipse's plugin manager, you are advised to launch Eclipse as root: this way the plugins will be installed in {{Filename|/usr/share/eclipse/plugins/}}; if you installed them as normal user, they would be stored in a version-dependent folder inside {{Filename|~/.eclipse/}}, and when upgrading Eclipse you would apparently lose them all.<br>
 +
*Do not use Eclipse as root for your everyday work.}}
  
 
=== C/C++ support ===
 
=== C/C++ support ===

Revision as of 11:33, 29 June 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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 and Perl. The IDE can also provide subversion support (see below) and task management (either through its built-in TODO list or through the eclipse-mylyn package).

Installation

It is very easy to install the Eclipse SDK in Arch Linux:

# pacman -S eclipse

This base package has Java development support built in.

Plugins

Warning:
  • If you want to install some plugins with Eclipse's plugin manager, you are advised to launch Eclipse as root: this way the plugins will be installed in Template:Filename; if you installed them as normal user, they would be stored in a version-dependent folder inside Template:Filename, and when upgrading Eclipse you would apparently lose them all.
  • Do not use Eclipse as root for your everyday work.

C/C++ support

If you want to use Eclipse for C/C++ development, also install the Eclipse CDT:

# pacman -S eclipse-cdt

Perl support

If you want to use Eclipse for Perl development, also install EPIC:

# pacman -S eclipse-epic

PHP support

If you want to use Eclipse for PHP development, also install phpeclipse:

# pacman -S eclipse-phpeclipse

Subversion support

There are packages in [community] and AUR for enabling Subversion support.

eclipse-subclipse

From the project home, "Subclipse is an Eclipse Team Provider plug-in providing support for Subversion within the Eclipse IDE."

# pacman -S eclipse-subclipse

Take a look at How to use Subversion with Eclipse for more information about Subclipse.

eclipse-subversive

Template:Package AUR is available from AUR.

See http://www.eclipse.org/subversive/ for details about this project.

Git support

Template:Package AUR is available from AUR.

Alternatively, add this repository to the Available Software Sites:

http://download.eclipse.org/egit/updates

and install egit with Eclipse's plugin manager.

See http://www.eclipse.org/egit/ for details about this project.

Updates

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Eclipse#)

Right after installation, Eclipse does not have any update repositories enabled, yet. On Eclipse's site you can find several URIs, which you can add through Window -> Preferences -> Install/Update -> Available Software Sites -> Add....

For Eclipse Indigo, add:

http://download.eclipse.org/releases/indigo

This automatically adds several other locations which you can enable in the Available Software Sites menu. After that you can update and install new software from Help -> Install New Software....

Using Sun JDK in place of OpenJDK

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Eclipse#)

Eclipse depends on openjdk6 by default, which you can easily replace with jdk, following this article.

By the way, you may want to link the file /opt/java/bin/java to /usr/bin/java:

# ln -s /opt/java/bin/java /usr/bin

Enable javadoc integration

Want to see API entries when hovering the mouse pointer over standard Java methods?

Online Version

If you have constant internet access on your machine, you can use the on-line documentation provided by sun. Just follow these instructions:

  1. Go to Window/Preferences, then go to Java/Installed JREs.
  2. There should be one named "java" with the type "Standard VM". Select this and click Edit.
  3. Select the Template:Filename item under "JRE system libraries:", then click "Javadoc Location...".
  4. Enter "http://java.sun.com/javase/6/docs/api/" in the "Javadoc location path:" text field.
  5. Done!

Offline Version

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.

  1. Start your favorite web browser and navigate to http://java.sun.com/javase/downloads/index.jsp
  2. Search for "Java SE 6 Documentation" and click the Download link.
  3. Follow the instructions to download the "jdk-6-doc.zip" file. (e.g. to Template:Filename).
  4. Go to Window/Preferences, then go to Java/Installed JREs.
  5. There should be one named "java" with the type "Standard VM". Select this and click Edit.
  6. Select the Template:Filename item under "JRE system libraries:", then click "Javadoc Location...".
  7. Select the point "Javadoc in archive"
  8. Enter the path to the previously downloaded Template:Filename (e.g. Template:Filename) in the "Archive path:" text field.
  9. Done!

Troubleshooting

Update is generating dependency errors

When trying to update Eclipse by using the "Check for updates" functionality, dependency errors are showed. Login as root or start Eclipse with sudo. Only root has the necessary permissions to do the update.

Autocompletion and javadoc render crash

For some reason, libxul may crash. To fix this issue, you can try installing Template:Package Official and adding the following lines in your Template:Filename:

-Dorg.eclipse.swt.browser.UseWebKitGTK=true

If that does not work (or if you do not want to use libwebkit) try:

-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/bin

Crash on first boot or when choosing "Help->Welcome"

Same as above. Edit Template:Filename and add just below -vmargs the line:

-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/bin