Failed to load JavaHL Library

129,081

Solution 1

If you do not need to use JavaHL, Subclipse also provides a pure-Java SVN API library -- SVNKit (http://svnkit.com). Just install the SVNKit client adapter and library plugins from the Subclipse update site and then choose it in the preferences under Team > SVN.

Solution 2

Try this:

  1. Select Window >> Preferences
  2. Expand Team >> SVN
  3. Under SVN interface set Client to SVNKit (Pure Java) SVNKit....

Solution 3

On Kubuntu, my path to the library changed because of installing another Java version. Here's the whole picture, but in short:

sudo apt-get install libsvn-java
sudo find / -name libsvnjavahl-1.so

The output from the last command could look like this, for example:

/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so

This gives you the path, so you can add the following to your eclipse.ini:

-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/

Solution 4

Check out this blog. It has a ton of information. Also if installing through brew don´t miss this note:

You may need to link the Java bindings into the Java Extensions folder:

 $ sudo mkdir -p /Library/Java/Extensions
 $ sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib

Solution 5

I Just installed Mountain Lion and had the same problem I use FLashBuilder (which is 32bit) and MountainLion is 64bit, which means by default MacPorts installs everything as 64bit. The version of subclipse I use is 1.8 As i had already installed Subversion and JavaHLBindings I just ran this command:

 sudo port upgrade --enforce-variants active +universal 

This made mac ports go through everything already installed and also install the 32bit version.

I then restarted FlashBuilder and it no longer showed any JavaHL errors.

Share:
129,081
1.21 gigawatts
Author by

1.21 gigawatts

Developer working on tools for design...

Updated on December 26, 2020

Comments

  • 1.21 gigawatts
    1.21 gigawatts over 3 years

    After updating to Snow Lion I started receiving these errors in Flash Builder / Eclipse when trying to use SVN:

    Failed to load JavaHL Library.
    These are the errors that were encountered:
    no libsvnjavahl-1 in java.library.path
    /opt/subversion/lib/libsvnjavahl-1.0.dylib:  Library not loaded: /usr/lib/libpq.5.dylib   Referenced from: /opt/subversion/lib/libsvnjavahl-1.0.dylib   Reason: no suitable image found.  Did find:  /usr/lib/libpq.5.dylib: mach-o, but wrong architecture  /usr/lib/libpq.5.dylib: mach-o, but wrong architecture
    no svnjavahl in java.library.path
    java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    
  • xarlymg89
    xarlymg89 over 11 years
    Thanks, that solved the problem and it's faster than unistalling the JavaHL plugin!
  • catrapture
    catrapture about 11 years
    What does the line do? -> This foces mac ports go through everything already installed and also install the 32bit version.
  • William T. Mallard
    William T. Mallard over 10 years
    Weird, on a hunch I just checked preferences and SVNKit was already there. This only happened on rare occasion (I'm not working in an SVN-backed project at the moment) so can't say that it worked. I really hope it does. When this does happen it locks up Eclipse until the search (?) finishes or the connect (?) times out after about a minute. Really annoying when you've got a big sprint and little time...
  • Nouman
    Nouman over 10 years
    The version of the Eclipse IDE being used would have nothing to do with JavaHL working or not working. subclipse.tigris.org/wiki/JavaHL
  • 3h3
    3h3 over 10 years
    I checked my Preference and found that there's only one choose as "JavaHL(JNI) 1.8.8(r1568071)". Somebody can tell me why and how to solve the problem? thanks
  • Cerin
    Cerin over 10 years
    This option is not available...even after installing SVNKit from its update site...
  • Eddie Curtis
    Eddie Curtis over 9 years
    @Cerin it definitely does work. Why don't you tell us what problem/error you're having and maybe we can help?
  • jah
    jah about 9 years
    Doing this made JavaHL available in Eclipse Luna with OpenJDK 1.7.0_79 on Trisquel 7.
  • Alexandre Morgaut
    Alexandre Morgaut about 9 years
    This worked perfectly for me. My computer rebooted for some external reason before I had a chance to read the post install instructions. Even if I could use the subclipse native SVNKit, I'm happy to not let the javahl extension half installed
  • robross0606
    robross0606 over 7 years
    This is the only answer here that ACTUALLY answers the original question.
  • Line
    Line over 6 years
    Where do you have "Subclipse" in "Install New Software"?
  • OreaSedap
    OreaSedap about 6 years
    @Line If you did not have Subclipse yet, you may click Add button from Install New Software menu and install it according to which version suits you. Insert Location by using this url subclipse.tigris.org/update_1.10.x .
  • TheGabiRod
    TheGabiRod over 5 years
    the real answer, the application requires this library, there's no need to put the path in the third step just restart and it will be recognized
  • Rodrigo Vázquez
    Rodrigo Vázquez over 3 years
    Thanks. The third step was needed on my xubuntu 20.04 with multiple java installs
  • Akhil
    Akhil over 2 years
    I'm on popOs! and this fixed the issue for me after spending last few hours working on other workarounds like updating eclipse.ini config file etc., Thanks a lot buddy!