5

我尝试从 SVN 更新一个项目(我有一个全新安装的 eclipse,但它是一个现有的工作区)所以我安装了 subclipse 但是当我想用 SVN 做任何事情时,我收到如下错误消息:

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

或者

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

我使用 eclipse indigo 3.7.2 在 Mac OS X 10.6.8 上工作。

有人可以帮我让它工作吗?

4

3 回答 3

5

答案在此 Wiki 页面中有详细说明:

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

您需要安装 Subversion 本机库,包括 JavaHL 库。我建议使用 MacPorts 或 HomeBrew 来获取本机库。

于 2012-04-04T13:25:31.870 回答
0

真的需要JavaHL吗?我只是忽略了这个错误,我仍然可以毫无问题地使用 svn。

于 2012-10-07T19:21:23.170 回答
0

确保您的 Subclipse 版本和您的本机 JavaHL 库匹配(请查看http://subclipse.tigris.org/wiki/JavaHL了解详细信息)。

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.

于 2014-02-21T15:09:48.873 回答