Failed to load JavaHL Library
Asked Answered
K

11

98

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
Keavy answered 2/8, 2012 at 1:51 Comment(2)
It sounds like this would relate to Eclipse and the SVN client you're using; not necessarily Flash Builder.Prostatitis
That sounds right. I'm using subclipse. I'll update the tags. ThanksKeavy
S
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.

Stere answered 8/8, 2012 at 20:28 Comment(3)
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...Gasiform
The version of the Eclipse IDE being used would have nothing to do with JavaHL working or not working. subclipse.tigris.org/wiki/JavaHLStere
@Gannon it definitely does work. Why don't you tell us what problem/error you're having and maybe we can help?Dominiquedominium
H
187

Try this:

  1. Select Window >> Preferences
  2. Expand Team >> SVN
  3. Under SVN interface set Client to SVNKit (Pure Java) SVNKit....
Heinz answered 9/1, 2013 at 13:30 Comment(4)
Thanks, that solved the problem and it's faster than unistalling the JavaHL plugin!Pulsate
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? thanksSchade
This option is not available...even after installing SVNKit from its update site...Gannon
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!Yance
S
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.

Stere answered 8/8, 2012 at 20:28 Comment(3)
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...Gasiform
The version of the Eclipse IDE being used would have nothing to do with JavaHL working or not working. subclipse.tigris.org/wiki/JavaHLStere
@Gannon it definitely does work. Why don't you tell us what problem/error you're having and maybe we can help?Dominiquedominium
I
34

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/
Incorporator answered 24/1, 2015 at 15:23 Comment(5)
Doing this made JavaHL available in Eclipse Luna with OpenJDK 1.7.0_79 on Trisquel 7.Histolysis
This is the only answer here that ACTUALLY answers the original question.Brigade
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 recognizedNordstrom
Thanks. The third step was needed on my xubuntu 20.04 with multiple java installsActuary
This answer solved the problem, including a problem with Jasper 6.17 which was freezing.Aksel
S
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
Samira answered 11/6, 2014 at 12:48 Comment(1)
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 installedExtrauterine
I
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.

Imalda answered 7/8, 2012 at 22:25 Comment(1)
What does the line do? -> This foces mac ports go through everything already installed and also install the 32bit version.Imalda
V
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

Vining answered 2/5, 2014 at 16:37 Comment(0)
C
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!

Croom answered 29/9, 2014 at 5:46 Comment(0)
D
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>

Detention answered 13/11, 2015 at 18:29 Comment(0)
J
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.

Jonson answered 23/6, 2016 at 14:43 Comment(0)
S
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. :)

Shushubert answered 26/12, 2017 at 3:57 Comment(2)
Where do you have "Subclipse" in "Install New Software"?Musicology
@Musicology 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 .Shushubert
S
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.

Speller answered 31/7, 2014 at 22:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.