Ubuntu下Subclipse报failed to load javahl library的解决办法

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
/opt/local/lib/libsvnjavahl-1.0.0.0.dylib: no suitable image found. Did find: /opt/local/lib/libsvnjavahl-1.0.0.0.dylib: mach-o, but wrong architecture


原来是缺少一些关联文件,去subclipse的Wiki看了看,说需要安装libsvn-java,在Ubuntu 下安装很简单,命令如下:

sudo apt-get install libsvn-java

安装完后,这文件在/usr/lib/jni目录下,这个目录并不是eclipse的java.library.path路径之一,所以还需要修改eclipse.ini来告诉eclipse去哪找这个libsvn-java相关的文件.
打开eclipse.ini,在最后行加入如下内容(注意换行)

-Djava.library.path= /usr/lib/jni 注意这个jni文件夹的位置,在ubuntu12.10中是
/usr/lib/i386-linux-gnu/jni

你可能感兴趣的:(subclipse)