Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to install Subclipse plugins for eclipse IDE. I have installed it but on restart of the IDE, it throws up the following error:

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.24/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib

How do I get past this error?

share|improve this question

3 Answers 3

If you are running "manually installed" version of Eclipse you can just provide path as runtime parameter.

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

Or better yet, create shell script and launcher that runs it.
I setup my Eclipse environment like this:

  • I download latest and greatest version of Eclipse (at the moment eclipse-java-indigo-SR2-linux-gtk-x86_64.tar.gz)
  • Per version I unpack it to ~/bin/eclipse-java-indigo-SR2-linux-gtk-x86_64/
  • I create a soft link with the name eclipse to previously named unpacked directory:

    cd ~/bin/ 
    ln -s eclipse-java-indigo-SR2-linux-gtk-x86_64 eclipse 
    
  • I create eclipse.sh script in ~/bin/eclipse/

    #!/bin/bash
    # the following is not really needed but is nice if you put script somewhere else (like Desktop)
    cd ~/bin/eclipse/
    # this fixes the menu items not showing bug
    export UBUNTU_MENUPROXY=0
    # add the jni library path
    ./eclipse -Djava.library.path=/usr/lib/jni
    
share|improve this answer
up vote 5 down vote accepted

Got it worked out. Very simple solution. Just added

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

after -vmargs in eclipse.ini file and restarted the IDE.

This solution won't work if you did a manual installation of eclipse, for example if you wanted to use a newer version than the one on the software centre

share|improve this answer
1  
Why do you say that it won't work with a manual installation? This is actually the recommended way to do it (subclipse.tigris.org/wiki/…) –  Victor P. Apr 30 '12 at 8:12
    
On my 12.04 64bit I had to find the file with 'find / -name libsvnjavahl-1.so' in '-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni' instead. –  alfonx Apr 8 '13 at 11:12

You first need to be sure that libsvn-java is installed (see subclipse Wiki: JavaHL):

apt-get install libsvn-java

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.