Question

I try to update a project from SVN (I have a fresh install of eclipse but it's an existing workspace) so I installed subclipse but when I want to to do anything with SVN I get error messages like :

Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

or

Problems reported while synchronizing SVNStatusSubscriber. 0 of 1 resources were synchronized.
An error occurred synchronizing <Project name>: Error getting status for resource P<Project name> Unable to load default SVN Client
Error getting status for resource P<Project name> Unable to load default SVN Client
Unable to load default SVN Client

I work on Mac OS X 10.6.8 with eclipse indigo 3.7.2.

Can someone help me to make it work?

Était-ce utile?

La solution

The answer is detailed in this Wiki page:

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

You need to install Subversion native libraries including the JavaHL library. I would recommend using MacPorts or HomeBrew to get the native libraries.

Autres conseils

Does one really need to have JavaHL? I was just ignoring the error and I could still use svn without any problem.

Make sure that your version of Subclipse and your native JavaHL libraries match (please check http://subclipse.tigris.org/wiki/JavaHL for details).

When unsure about the version of JavaHL, do something like

$ strings /opt/local/lib/libsvnjavahl-1.a | fgrep svn:
svn:auth:username
svn:auth:password
svn:auth:config-dir
svn: 
svn:1.8.8 (r1568071)

Here, I have the 1.8.8 version installed. Btw, this one appears to work well with Subclipse 1.10.x.

Then check whether your native library folder, for example /opt/local/lib when using MacPorts, is taken into account. MacPorts for example adds symbolic link /Library/Java/Extensions/libsvnjavahl.jnilib, thus there is no need to configure java.library.path on launching Eclipse or STS.

Again if unsure, you may try something like

STS --launcher.appendVmargs -vmargs -Djava.library.path=/opt/local/lib

Be aware however, that the launch configuration above overrides the default setting of java.library.path which may trigger other (non 100% pure) plugins to fail.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top