首页 > 代码库 > CentOS SVN Failed to load JavaHL Library

CentOS SVN Failed to load JavaHL Library

在CentOS 6上的eclipse安装了svbclipse插件后,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 = /data/jdk1.6.0_12/jre/lib/amd64/server:/data/jdk1.6.0_12/jre/lib/amd64:/data/jdk1.6.0_12/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib  

打开window->preferences->Team->SVN,在SVN interface中提示JavaHL(JNI) Not available

然后检查系统,已经安装了subversion和subversion-javahl包,再搜索libsvnjavahl库所在位置,最后发现在/usr/lib64/目录下有一个libsvnjavahl-1.so文件存在,然后修改eclipse.ini文件,添加下面的option

    -Djava.library.path=/lib:/usr/lib:/usr/lib64  

重新启动eclipse,subversion工作正常。