Failed to load JavaHL Library

EclipseApache FlexSvnFlash BuilderSubclipse

Eclipse Problem Overview


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

Eclipse Solutions


Solution 1 - Eclipse

Try this:

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

Solution 2 - Eclipse

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 3 - Eclipse

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 - Eclipse

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 - Eclipse

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.

Solution 6 - Eclipse

You may or may not need JavaHL depending on your OS. In addition to other suggestions just posting this here.

enter image description here

For other OS see this source: http://subclipse.tigris.org/wiki/JavaHL

Solution 7 - Eclipse

maybe you can try this: change jdk version. And I resolved this problem by change jdk from 1.6.0_37 to 1.6.0.45 . BR!

Solution 8 - Eclipse

i tried every single solution available and finally for me the problem was:

uninstall Native JavaHL 1.6

install everything under Subclipse from this site:

http://subclipse.tigris.org/update_1.10.x>

Solution 9 - Eclipse

For me i started getting this problem when I upgraded to java 8, and then reverted back to java 7. Upgraded again to java 8 and the problem got resolved.

Solution 10 - Eclipse

For Eclipse/STS v3.9.X windows user, you may need to update your subclipse version.

Go to Help > Install New Software > Click on Subclipse and edit the version from 1.6.X to 1.8.X

This method also apply to those who encounter JavaHL not available. You can check whether JavaHL is available or not by Go to Windows > Preference > Team > SVN. You may check it in SVN Interface > Client section.

If this work on MAC OS, kindly response in comment section. :)

Solution 11 - Eclipse

My Understanding - Basically, svn client comes by default on Mac os. While installing in eclipse we should match svn plugin to the mac plugin and javaHL wont be missing. There is a lengthy process to update by installing xcode and then by using homebrew or macports which you can find after googling but if you are in hurry use simply the steps below.

  1. on your mac terminal shell

$ svn --version

Note down the version e.g. 1.7.

  1. open the link below

http://subclipse.tigris.org/wiki/JavaHL

check which version of subclipse you need corresponding to it. e.g.

Subclipse Version SVN/JavaHL Version 1.8.x 1.7.x

  1. ok, pick up url corresponding to 1.8.x from

http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA

and add to your eclipse => Install new Software under help

select whatever you need, svn client or subclipse or mylyn etc and it will ask for restart of STS/eclipse thats it you are done. worked for me.

NOTE: if you already have multiple versions installed inside your eclipse then its best to uninstall all subclipse or svn client versions from eclipse plugins and start fresh with steps listed above.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Question1.21 gigawattsView Question on Stackoverflow
Solution 1 - EclipseAtul KaushikView Answer on Stackoverflow
Solution 2 - EclipseMark PhippardView Answer on Stackoverflow
Solution 3 - EclipsemakkasiView Answer on Stackoverflow
Solution 4 - EclipseFedericoView Answer on Stackoverflow
Solution 5 - EclipsecatraptureView Answer on Stackoverflow
Solution 6 - EclipsePrinceView Answer on Stackoverflow
Solution 7 - EclipseEvanView Answer on Stackoverflow
Solution 8 - EclipseWeb DevelopmentView Answer on Stackoverflow
Solution 9 - EclipsesasfourView Answer on Stackoverflow
Solution 10 - EclipseOreaSedapView Answer on Stackoverflow
Solution 11 - EclipseNeerajView Answer on Stackoverflow