Issue with JavaHL library when using Eclipse
While using the subversion plugin ‘sublipse’ in Eclipse IDE, i ran into the following problem
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.03/jre/lib/i386/client::/
This is because the JavaHL library used by the SVN plugin in Eclipse to interface with SVN Server is missing or not available. There are two ways to rectify this.
- Install the JavaHL library and point eclipse to this.
- Use ‘PureSVNKit’ in SVN Preferenves in Eclipse ( Window -> Preferences -> Team -> ‘SVN Preferences’ )
I went for the first one. Here is how you do it
1. Install libsvn. In ubuntu, use the following command
sudo apt-get install libsvn-java
2. This will install the file libsvnjavahl-1.so into the /usr/lib/jni directory. Standard installations of eclipse will automaticall pick it up. ( Only a restart of eclipse is necessary )
3. For non standard installations of eclipse, you wil need to edit the ‘eclipse.ini’ file in the eclipse home directory. To the ‘vmargs’ section of the file, add the following detail
Find below, the contents of my eclipse.ini
What you are doing here is , we are passing the library location to the VM whcih runs Eclipse. So eclipse will look for ‘library files’ in this location as well.
For more on JavaHL, use the JavaHL FAQ @ http://subclipse.tigris.org/wiki/JavaHL