The error:
Selecting from Eclipse, Preferences>Team>SVN and select SVN interface: JavaHL(JNI) on Linux you get:

Failed to load JavaHL Library.
These are 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.03/jre/lib/i368/client::/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386::/usr/lib/xulrunner-addons:/usr/lib/xulrunner/addons:/usr/java/packages/lib/i386:/lib:/usr/lib

The solution:
install Java bindings for Subversion libraries:

$ sudo apt-get install libsvn-java

This will install required JNI libraries on /usr/lib/jni.
Then, add this path to LD_LIBRARY_PATH environment variable before starting Eclipse. For convenience, you can do that creating a shell script like the following:

$ vi ~/bin/eclipse

#! /bin/sh
export LD_LIBRARY_PATH=/usr/lib/jni
/opt/eclipse/eclipse

Then make it executable:

$ chmod +x ~/bin/eclipse

To run eclipse then, just launch ~/bin/eclipse and enjoy native Subversion binding.


6 Responses to “Setting up JavaHL (JNI) support in Eclipse on Linux”  

  1. 1 Stuart

    Thanks! This helped a lot.

  2. 2 Cay Horstmann

    If you don’t want to make a special shell script to launch Eclipse, you can also add a file /etc/ld.so.conf.d/jni.conf with the line /usr/lib/jni (follow /etc/ld.so.conf.d/libc.conf for guidance). Run sudo ldconfig once so that the changes are picked up, then start Eclipse the way you usually do. (This is on Ubuntu 9.10.)

  3. 3 George

    I am embedding svn into a web application using javahl…..i have libsvn-java installed,svn version 1.5.4,sun-java-6 on ubuntu jaunty jackalope(9.0.4)…i keep getting the following exception
    “java.lang.UnsatisfiedLinkError: no svnjavahl-1 in java.library.path”………Does anyone know how to sort this issue?

  4. 4 Juan

    Thank you very much Luigi programmer!!!!!!!!!!!

    I had been trying to solve this problem for too many time, on my java superior school computer till today.

    Two months ago I finish deleting eclipse netbeans and jbuilder on ubuntu just for the problem,
    GRACIAS THANKS

    :D

  5. 5 Gustavo

    Hey Dude! that work like a charm! Thanks!

  1. 1 工作环境迁移至Ubuntu笔记 | Kavin-Zhao


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Current day month ye@r *


Calendar

June 2008
M T W T F S S
« May   Jul »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening