If you do not have Eclipse installed yet, run:

sudo apt-get install eclipse

Install Subversion

sudo apt-get install subversion

Install the Subversion plugin for Eclipse

Get the Java bindings for Subversion:

sudo apt-get install libsvn-java

Now we are ready to install the plugins in Eclipse.

Open Eclipse.

Go to Help -> Install New Software

Then hit the “Add” button.

Put “Subclipse 1.6.x (Eclipse 3.2+)” under Name and “http://subclipse.tigris.org/update_1.6.x” under Location:

Add the libraries for Subclipse
Add the libraries for Subclipse

The above is for Elclips 3.2+ and Subversion 1.6.x.

If you have different Eclipse or Subversion versions, check this list and substitute accordingly:

Name: Subclipse 1.6.x (Eclipse 3.2+)
URL: http://subclipse.tigris.org/update_1.6.x

Name: Subclipse 1.4.x (Eclipse 3.2+)
URL: http://subclipse.tigris.org/update_1.4.x

Name: Subclipse 1.2.x (Eclipse 3.2+)
URL: http://subclipse.tigris.org/update_1.2.x

Name: Subclipse 1.0.x (Eclipse 3.0/3.1)
URL: http://subclipse.tigris.org/update_1.0.x

More info about the different versions: http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA

Then hit “OK”. You will now be presented with these options:

Subclipse Installation Options
Subclipse Installation Options

If you are unsure what Subclipse component you will need, you can check all of them. Also, keep in mind that you can always go back to this in the future and install/uninstall any of the components as needed.

Then “Next” and “Finish” on the subsequent screens.

After the plugins are installed, it will prompt you to restart Eclipse. Go ahead and do so.

You are not done yet. You need to fix the JavaHL.

Edit the eclipse.ini file:

sudo vi /usr/lib/eclipse/eclipse.ini

Add the following line under -vmargs:

-Djava.library.path=/usr/lib/jni

Edit (2012-11-23): The above path is for a 32bit installation. The 64bit installation’s library path is /usr/lib/x86_64-linux-gnu/jni. If you are unsure the JavaHL library is on your machin, just search for libsvnjavahl-1.so:

sudo find / -name "libsvnjavahl-1.so"

That will give you the path you need to add to the eclipse.ini file.

Here is what my eclipse.ini file looks like:

$ cat /usr/lib/eclipse/eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-startup
--launcher.library
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-startup
/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-vmargs
-Djava.library.path=/usr/lib/jni
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=//usr/share/eclipse/dropins
-Xms40m
-Xmx256m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=//usr/share/eclipse/dropins

For more info on fixing JavaHL if you need it: http://subclipse.tigris.org/wiki/JavaHL#head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe

You should be able to use Subversion with Eclipse for your projects at this point.

Install Subversion and Subclipse for Eclipse on Ubuntu

7 thoughts on “Install Subversion and Subclipse for Eclipse on Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

*