97

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
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231

11 Answers11

187

Try this:

  1. Select Window >> Preferences
  2. Expand Team >> SVN
  3. Under SVN interface set Client to SVNKit (Pure Java) SVNKit....
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
Atul Kaushik
  • 5,181
  • 3
  • 29
  • 36
  • 7
    Thanks, that solved the problem and it's faster than unistalling the JavaHL plugin! – xarlymg89 Feb 12 '13 at 18:10
  • 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 – 3h3 Mar 10 '14 at 09:43
  • 1
    This option is not available...even after installing SVNKit from its update site... – Cerin Mar 13 '14 at 16:27
  • 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! – Akhil Sep 26 '21 at 13:26
117

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.

Mark Phippard
  • 10,329
  • 2
  • 32
  • 42
  • 1
    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... – William T. Mallard Nov 23 '13 at 17:37
  • 1
    The version of the Eclipse IDE being used would have nothing to do with JavaHL working or not working. http://subclipse.tigris.org/wiki/JavaHL – Mark Phippard Dec 03 '13 at 14:52
  • @Cerin it definitely does work. Why don't you tell us what problem/error you're having and maybe we can help? – Eddie Curtis Nov 24 '14 at 11:44
32

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/
Amos M. Carpenter
  • 4,848
  • 4
  • 42
  • 72
makkasi
  • 6,328
  • 4
  • 45
  • 60
7

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
Federico
  • 1,636
  • 2
  • 22
  • 24
  • 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 – Alexandre Morgaut May 21 '15 at 09:49
2

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.

catrapture
  • 1,916
  • 6
  • 20
  • 22
  • What does the line do? -> This foces mac ports go through everything already installed and also install the 32bit version. – catrapture May 22 '13 at 05:00
2

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

Prince
  • 20,353
  • 6
  • 39
  • 59
1

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!

Evan
  • 266
  • 4
  • 5
1

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>

Web Development
  • 421
  • 1
  • 3
  • 15
1

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.

sasfour
  • 399
  • 1
  • 3
  • 10
1

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. :)

OreaSedap
  • 21
  • 7
  • Where do you have "Subclipse" in "Install New Software"? – Line Mar 16 '18 at 10:37
  • @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 http://subclipse.tigris.org/update_1.10.x . – OreaSedap Apr 02 '18 at 08:56
0

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.

2) 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

3) 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.

Neeraj
  • 1,163
  • 2
  • 18
  • 32