Home > eclipse, linux, subversion, ubuntu > Subclipse/Subversion error on Ubuntu: Failed to load JavaHL Library

Subclipse/Subversion error on Ubuntu: Failed to load JavaHL Library

I’ve installed subclipse and when I restart eclipse and try to share a project, I get this error:

The error is:


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.26/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/../lib/amd64:/app/oracle/product/10.2.0/db_1/Lib:/usr/lib64/xulrunner-addons:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

In most of the cases is due to the lack of the libsvn-java library, so just install it:


$ sudo apt-get install libsvn-java

Now you have to tell eclipse where to find this libraries. First, locate where the is:


$sudo updatedb

$ locate libsvnjavahl-1.so
/usr/lib/jni/libsvnjavahl-1.so
/usr/lib/jni/libsvnjavahl-1.so.0
/usr/lib/jni/libsvnjavahl-1.so.0.0.0

Now, edit PATH_TO_ECLIPSE/eclipse.ini and add this line below -vmargs:


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

This is my full eclipse.ini with the line already added:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.0.v20100503
-product
org.eclipse.epp.package.php.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Djava.library.path=/usr/lib/jni
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m

If you still get the error, you’d probably modified the wrong eclipse.ini. In my case, I have a copy of eclipse decompressed in /app folder, but I also have eclipse.ini in /etc, /usr/lib/eclipse and /opt/ibm/lotus/notes/framework/rcp/eclipse/plugins/com.ibm.rcp.base_6.2.2.20100729-1241/linux/x86/. So, be sure to modify the correct eclipse.ini.

To check if you have modified the correct eclipse.ini, you can follow the Linux troubleshooting section at http://subclipse.tigris.org/wiki/JavaHL.

Advertisements
  1. Marcos Vidolin
    March 20, 2014 at 3:10

    Reblogged this on Marcos Vidolin's Blog and commented:
    SVN error on Eclipse/Ubuntu: Failed to load JavaHL Library

    Like

  2. July 24, 2012 at 15:37

    Excellent, appreciate for you help !

    Like

  3. alex
    March 14, 2012 at 16:43

    Great!! Save my day!!

    Like

  1. April 29, 2013 at 9:19

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: