Subclipse 1.6.x and Eclipse 3.5 on Ubuntu 9.10 – Karmic Koala

A quick post to get subclipse working on Eclipse 3.5 on Karmic Kola. We are doing a group project for our CS-480 Database Systems with 7 team members. Obvious choice was google code as Min and Ali had used it in previous semesters – familiarity is a strong motivation not to select your CASE tools (read github for SCM) when your grade depends on meeting the deadline. 😀

Min mailed us a comprehensive document on getting subclipse working with code.google.com – but I stumbled across getting it working in Ubuntu – the well known problem of gnome-keyring and JavaHL ate up the last 2 hours.

Once you’ve installed subclipse 1.6.x in Eclipse and would like to jump off to checkout code for your favorite open source project – you’ll hit hard by messages similar to these:


Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/java/packages/lib/i386:/lib:/usr/lib

Nice as people are in FOSS world, it’ll also point you to the documentation JavaHL wiki to fix this. While it gives you the basic steps required – but distro-specific details were missing. So here are the quick steps.

1. Install libsvn-java using Synpatic or from the commmand line sudo apt-get install libsvn-java

2.
Edit the eclipse.ini file in your eclipse directory to add

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

to tell Eclipse where to look for all Java SVN bindings

3. You also need to tell gnome-keyring to shut the f* up and let subclipse work. For this you keep your password-store as blank. Edit the svn config file located in the .subversion directory of your home directory by adding


### Set password stores used by Subversion. They should be
### delimited by spaces or commas. The order of values determines
### the order in which password stores are used.
### Valid password stores:
### gnome-keyring (Unix-like systems)
### kwallet (Unix-like systems)
### keychain (Mac OS X)
### windows-cryptoapi (Windows)
password-stores =

I also disabled gnome-keyring using the gconf-editor (navigate to /apps/gnome-keyring/daemon-components uncheck SSH and PKCS11) – but not really required I guess.

(Re)Start Eclipse. You should now be able to checkout your project.

Ummm, how much of the school’s project did I complete this morning? None really :P.
Next step is getting Apache Derby working.