-
Notifications
You must be signed in to change notification settings - Fork 120
JavaHL on Linux
A couple of general requirements to be aware of:
- Your JVM can only load a native library that is the same architecture. So if you are on a 64-bit OS with the 64-bit Subversion native libraries installed, you cannot use a 32-bit JVM
- Subclipse includes the Java portion of JavaHL, so you must have the same major.minor version of the libraries installed. Otherwise you will receive an error that it could not load the library due to a version mismatch. In current Subclipse master, the requirement is Subversion 1.9.x.
The best way to install Subversion and JavaHL on Linux is to use the package from your distro, For example, on Debian based distros like Ubuntu or Mint you would just do this:
apt-get install libsvn-java
And on RPM based distros like Fedora or CentOS you would do:
yum install subversion-javahl
The main problem you might run into is that some distros include an older version of the SVN client then you desire. The current Subclipse version requires SVN 1.9.x, so if your distro includes 1.7 or 1.8 you need to get a newer version.
WANdisco provides up to date package for many Linux distributions. These packages are designed to replace/upgrade the ones that come with your distribution. https://www.wandisco.com/subversion/download
CollabNet provides packages for RPM based distributions. http://www.collab.net/downloads/subversion
The CollabNet package has a different RPM name and installs into a private folder, so it does not replace the one from your distribution. Instead, you edit your PATH to use the version installed.
This varies based on the version of your distribution and the package. Some of them install the JavaHL library to a location where the JVM automatically finds it, and others do not. The JVM searches for JNI libraries based on the value of java.library.path. If you install the package and Eclipse is still giving you an error message, you can configure Eclipse so that it finds the library.
To do this, find the folder where the eclipse executable is installed. There should be a file named eclipse.ini. Open this file in a text editor and look for a line that says -vmargs On the lines that follow will be arguments to pass to the JVM on startup. On the line immediately after, add the following:
-vmargs
-Djava.library.path=</path/to/library>
The path to the library, needs to the folder where libsvnjavahl is installed by your package. For example, on Ubuntu you would need:
-vmargs
-Djava.library.path=/usr/lib/jni
And if you use the CollabNet RPM then you need:
-vmargs
-Djava.library.path=/opt/CollabNet_Subversion/lib