Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to load JavaHL Library

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
like image 846
1.21 gigawatts Avatar asked Aug 02 '12 01:08

1.21 gigawatts


3 Answers

Try this:

  1. Select Window >> Preferences
  2. Expand Team >> SVN
  3. Under SVN interface set Client to SVNKit (Pure Java) SVNKit....
like image 158
Atul Kaushik Avatar answered Nov 15 '22 16:11

Atul Kaushik


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.

like image 23
Mark Phippard Avatar answered Nov 15 '22 15:11

Mark Phippard


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/
like image 29
makkasi Avatar answered Nov 15 '22 15:11

makkasi