Difference between revisions of "Eclipse"

Line 1: Line 1:
===Installation===
+
=Requirements=
 +
Eclipse requires a Java JDK to work.
 +
See [[JDK setup|Java JDK setup]]
  
 +
 +
=Installation=
 
Download eclipse from the official website: http://eclipse.org/downloads/
 
Download eclipse from the official website: http://eclipse.org/downloads/
  
 
Take the '''Eclipse IDE for Java EE developers''' version.  
 
Take the '''Eclipse IDE for Java EE developers''' version.  
  
====Linux====
 
  
=====Core installation=====
+
==Windows==
 +
Just extract the archive and run ./eclipse/eclipse.exe
 +
 
 +
 +
==Linux==
 +
===Basic installation===
 
* Download the eclipse.deb package
 
* Download the eclipse.deb package
 
* Install the package using:
 
* Install the package using:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sudo dpkg -i eclipse.deb
+
tar -xzvf eclipse.tar.gz
</syntaxhighlight>
 
 
 
If you encounter some errors during installation, just do:
 
<syntaxhighlight lang="bash">
 
sudo apt-get install -f && sudo dpkg -i eclipse.deb
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 22: Line 25:
  
  
 
+
===Create a desktop launcher===
=====JavaHL for Subclipse=====
 
Source: [http://subclipse.tigris.org/wiki/JavaHL Subclipse JavaHL wiki]
 
 
 
Linux requires the JavaHL client for Subclipse:
 
<syntaxhighlight lang="bash">
 
sudo apt-get install libsvn-java
 
</syntaxhighlight>
 
Find the library file:
 
<syntaxhighlight lang="bash">
 
sudo find / -name libsvnjavahl-1.so
 
</syntaxhighlight>
 
You should have something like:
 
<syntaxhighlight lang="bash">
 
guillaume@VC076:~/DEV/eclipse$ sudo find / -name libsvnjavahl-1.so
 
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
 
</syntaxhighlight>
 
 
 
Now, update your eclipse.ini configuration
 
<syntaxhighlight lang="bash">
 
vim eclipse.ini
 
</syntaxhighlight>
 
 
 
Add the path without '/' at the end.
 
<syntaxhighlight lang="bash">
 
-vmargs
 
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni
 
</syntaxhighlight>
 
 
 
→ Note: Ubuntu 13.10 as only the JavaHL 1.7 library. So you should not install SVN client 1.8.x but '''SVN client 1.7.x''' !!
 
 
 
 
 
=====Create a launcher=====
 
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
sudo vim /usr/share/applications/eclipse.desktop
 
sudo vim /usr/share/applications/eclipse.desktop
Line 64: Line 35:
 
Version=4.3.0
 
Version=4.3.0
 
Name=Eclipse
 
Name=Eclipse
Comment=IDE for all seasons
+
Comment=Eclipse IDE
 
Exec=/home/guillaume/DEV/eclipse/eclipse -clean
 
Exec=/home/guillaume/DEV/eclipse/eclipse -clean
 
Icon=/home/guillaume/DEV/eclipse/icon.xpm
 
Icon=/home/guillaume/DEV/eclipse/icon.xpm
Line 73: Line 44:
  
  
======Ubuntu 13.10======
+
====Ubuntu 13.10 - launcher Fix====
 
 
=======Launcher fix=======
 
!!! Ubuntu 13.10 bug !!!
 
 
If the menu doesn't appear correctly you must create the following launcher:
 
If the menu doesn't appear correctly you must create the following launcher:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 93: Line 61:
  
  
=======SWT libraries fixes=======
+
====SWT libraries fixes====
 
On the latest distribution Eclipse sometimes crashed due to libswt-*.so  
 
On the latest distribution Eclipse sometimes crashed due to libswt-*.so  
  
Line 100: Line 68:
 
apt-get install libx11-dev libxtst-dev libgl1-mesa-dev libglu1-mesa-dev libgtk-3-dev  
 
apt-get install libx11-dev libxtst-dev libgl1-mesa-dev libglu1-mesa-dev libgtk-3-dev  
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
 +
 +
=Eclipse configuration=
 +
 +
==JDK==
 +
Window menu -> Preferences -> Java -> Installed JRE
 +
    > Add the JDK as a standard VM
 +
    > JRE home = JDK root
 +
    > Click "Finish"
 +
Select the new JDK as the default one
 +
 +
Preferences -> Java -> Installed JRE -> Execution Environment
 +
    > For each java version adjust the JVM to use
 +
 +
 +
 +
===JavaHL for Subclipse===
 +
Source: [http://subclipse.tigris.org/wiki/JavaHL Subclipse JavaHL wiki]
 +
 +
Linux requires the JavaHL client for Subclipse:
 +
<syntaxhighlight lang="bash">
 +
sudo apt-get install libsvn-java
 +
</syntaxhighlight>
 +
Find the library file:
 +
<syntaxhighlight lang="bash">
 +
sudo find / -name libsvnjavahl-1.so
 +
</syntaxhighlight>
 +
You should have something like:
 +
<syntaxhighlight lang="bash">
 +
guillaume@VC076:~/DEV/eclipse$ sudo find / -name libsvnjavahl-1.so
 +
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
 +
</syntaxhighlight>
 +
 +
Now, update your eclipse.ini configuration
 +
<syntaxhighlight lang="bash">
 +
vim eclipse.ini
 +
</syntaxhighlight>
 +
 +
Add the path without '/' at the end.
 +
<syntaxhighlight lang="bash">
 +
-vmargs
 +
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni
 +
</syntaxhighlight>
 +
 +
→ Note: Ubuntu 13.10 as only the JavaHL 1.7 library. So you should not install SVN client 1.8.x but '''SVN client 1.7.x''' !!

Revision as of 11:15, 26 January 2014

Requirements

Eclipse requires a Java JDK to work. See Java JDK setup


Installation

Download eclipse from the official website: http://eclipse.org/downloads/

Take the Eclipse IDE for Java EE developers version.


Windows

Just extract the archive and run ./eclipse/eclipse.exe


Linux

Basic installation

  • Download the eclipse.deb package
  • Install the package using:
tar -xzvf eclipse.tar.gz
  • Launch application by running ./eclipse/eclipse


Create a desktop launcher

sudo vim /usr/share/applications/eclipse.desktop

Put the following content where /home/guillaume/DEV/eclipse is the path to Eclipse.

[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=Eclipse IDE
Exec=/home/guillaume/DEV/eclipse/eclipse -clean
Icon=/home/guillaume/DEV/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application


Ubuntu 13.10 - launcher Fix

If the menu doesn't appear correctly you must create the following launcher:

[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=IDE for all seasons
Exec=env UBUNTU_MENUPROXY=0 /home/guillaume/DEV/eclipse/eclipse -clean
Icon=/home/guillaume/DEV/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application

Don't forget the Exec=... line! The key is "env UBUNTU MENUPROXY=0"


SWT libraries fixes

On the latest distribution Eclipse sometimes crashed due to libswt-*.so

To resolve that, install the development libraries:

apt-get install libx11-dev libxtst-dev libgl1-mesa-dev libglu1-mesa-dev libgtk-3-dev


Eclipse configuration

JDK

Window menu -> Preferences -> Java -> Installed JRE

    > Add the JDK as a standard VM
    > JRE home = JDK root
    > Click "Finish"

Select the new JDK as the default one

Preferences -> Java -> Installed JRE -> Execution Environment

    > For each java version adjust the JVM to use


JavaHL for Subclipse

Source: Subclipse JavaHL wiki

Linux requires the JavaHL client for Subclipse:

sudo apt-get install libsvn-java

Find the library file:

sudo find / -name libsvnjavahl-1.so

You should have something like:

guillaume@VC076:~/DEV/eclipse$ sudo find / -name libsvnjavahl-1.so
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so

Now, update your eclipse.ini configuration

vim eclipse.ini

Add the path without '/' at the end.

-vmargs
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni

→ Note: Ubuntu 13.10 as only the JavaHL 1.7 library. So you should not install SVN client 1.8.x but SVN client 1.7.x !!