Installing Subclipse Plugin in Eclispe (unable to load JavaHL)

来源:互联网 发布:光纤测试仪福禄克网络 编辑:程序博客网 时间:2024/05/17 06:09

Snow Leopard (Mac osx 10.6.x) come with svn by default. After installing Subclipse plugin, Eclipse failed to locate the javaHL library, which is required by Subclipse to call local Subversion APIs (implemented in C).


My first solution (failed)

1. install subversion-javahlbindings using Mac Ports (command: sudo port install subversion-javahlbindings)

2. then we can find the svn-javahl.jar under /opt/local/lib/svn-javahl/. I add the path to PATH and also set the virtual machine argument in eclipse.ini (eclipseBase/Contents/MacOS/eclipse.ini) by adding a line after "-vmargs"

Djava.library.path=/opt/local/lib/


But this solution does not work, eclipse still reports that it failed to locate javaHL. Searching on Google suggests that 64bit JVM will not be able to load 32bit javaHL. So give up this solution. 


My second solution (bingo! problem solved easily)

1. I tried to uninstall the preloaded subversion, but failed to locate where the svn is installed. Then I simply remove the svn* commands under /usr/bin/

2. Download subversion (including javaHL, and both 32 bit and 64 bit binary) from CollabNet as suggested by

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

Download webpage: http://www.open.collab.net/downloads/subversion/

3. Subversion will be installed under /opt/subversion. Add "/opt/subversion/bin" to PATH so that svn can be used in command line

4. restart eclipse and we can find Subclipse can load javaHL library now. hurrah~~~


An alternative solution (tested on Mountain Lion)

1. install svn from Apple Developers 

http://blog.grapii.com/2012/08/svn-missing-in-mac-os-x-10-8-mountain-lion/

2. If you do not need to use JavaHL, Subclipse also provides a pure-Java SVN API library -- SVNKit (http://svnkit.com). Just install the SVNKit client adapter and library plugins from the Subclipse update site and then choose it in the preferences under Team > SVN.

原创粉丝点击