MyEclipse使用SVN插件报Failed to load JavaHL Library.错误

5 篇文章 0 订阅
1 篇文章 0 订阅
找到了下面这个英文解决方法,写的很详细,备用座位参考。

While installing the subversion plugin Subclipse in the Eclipse IDE I came across a problem. Subclipse uses "JavaHL (JNI)" to interface with subversion by default. This default setting generates an error when accessing the "Window->Preferences->Team->SVN" preferences:

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 = /usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386/client::/
usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386::/usr/lib/firefox:/usr/lib/
firefox/:/usr/java/packages/lib/i386:/lib:/usr/lib

NOTE: I am using Sun Java

This error does not seem to affect the basic subversion functionality (eg, checkout, commit, merge, etc.) and only appears when accessing the SVN preferences. However I have a custom subversion config I like to use in PHP development and I need to be able to access the SVN preferences.

The simplest way to bypass this issue is to select the "SVNKit (Pure Java)" in the "SVN interface" section of the SVN preferences. However if you require and/or desire the JavaHL subversion interface read on for a fix.
Install libsvn-java

The Debian/Ubuntu package libsvn-java has the libsvnjavahl-1.so file that is required by JavaHL subversion interface. Install libsvn-java by typing the following into a command line:

sudo  apt-get install libsvn-java

Restart Eclipse.

After installation is complete the required file (libsvnjavahl-1.so) is installed into the /usr/lib/jni directory. Default installations of Eclipse will pick this directory up automatically. Non-standard installation, such as ones installed by hand, will not find the required file.
Non-standard Installations

I need to tell Eclipse where to find libsvnjavahl-1.so for non-standard installations. The error message indicates the required file cannot be found in the paths defined by java.library.path. We can either place the file (via symlink) into one of the specified paths OR set the java.library.path to point to the /usr/lib/jni directory. Using a symlink is viable however future upgrades of java may cause the installation to break. As illustrated below I have chosen to overwrite the java.library.path variable.
Set java.library.path via eclipserc

This solution affects the Eclipse installation on a per-user basis. Changes made here will not effect anyone else using Eclipse. To over-ride the java.library.path variable we will need to create a file called eclipserc in the .eclipse directory:

gedit ~/.eclipse/eclipserc

NOTE: The ~/.eclipse directory is created when Eclipse is first run.

Add the following line to ~/.eclipse/eclipserc:

VMARGS="-Djava.library.path=/usr/lib/jni"

Save the file and close it. Restart Eclipse and JavaHL will no longer generate error messages when accessing the SVN preferences.

参考连接 http://islandlinux.org/howto/installing-javahl-subclipseeclipse-ubuntu
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值