Eclipse Ganymede and Subclipse on Ubuntu - JavaHL (JNI) not available

May 21st, 2009 by tobias

I finally got around to updating my Eclipse, PyDev, and Subclipse environment today, which I use for Django development.

Formerly I was using the SvnKit (pure-Java) libraries. SvnKit “felt” slow to me, compared to my command line SVN client, so this time I tried to get the JavaHL (JNI) libraries working.

For the record I’m using Ubuntu (jaunty) with Eclipse 3.4 (Ganymede). This version of Ubuntu comes with Subversion 1.5, so I need to install Subclipse 1.4. See:

http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA

I installed everything through the Eclipse update manager (minus SvnKit), but JavaHL didn’t show up under Preferences -> Team -> SVN. The error message was: JavaHL (JNI) not available.

I had installed Eclipse manually (not through apt-get), so the solution was to install the JavaHL libraries:

apt-get install libsvn-java

and add the following line to my eclipse.ini (usually in the top level eclipse directory):

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

Restart Eclipse, and you should be good to go!

4 Responses to “Eclipse Ganymede and Subclipse on Ubuntu - JavaHL (JNI) not available”

  1. Doug Says:

    Thank you this was very helpful. I also was using SVNkit. I did have one problem after switching over to JavaHL - Subclipse no longer caches my SVN login credentials, so it asks for my username and password for every single file I try to commit or checkout of my repository. Any advice?

  2. tobias Says:

    Not sure. For my SSH-based repositories I just use ssh keys, which means Eclipse doesn’t have to do anything. For the HTTPS respositories, it caches them for me.. in fact I get a “save password” checkbox whenever I enter credentials. Good luck!

  3. jmiguel77 Says:

    Hi:

    I did everything you posted here, and get subclipse 1.4 running with the JavaHL 1.5.4 in a ganymede in a jaunty machine

    I checked out a project that i previously placed in a repository (using a windows machine with galileo an subclipse 1.6); the project downloaded fine and everything is working

    The problem is that i cannot commit; everytime i try to commit something i get this error:

    RA layer request failed
    svn: Commit failed (details follow):
    svn: Server sent unexpected return value (400 Bad Request) in response to OPTIONS request for ‘/davinci/administration/davinci/ant’

    the command issued by subclipse is:

    commit -m “test” /home/edu/workspace/davinci/ant/build.properties

    any ideas ???

  4. tobias Says:

    Haven’t seen that one before either, sorry!

Leave a Reply