Reputation: 43057
I have installed Eclipse Kepler on my Ubuntu 12.04 LTS system and I am finding many difficulties installing Subclipse plugin on it.
I have do the following steps:
I am go into Help ---> Install New Software and I have add this repository URL: http://subclipse.tigris.org/update_1.10.x/ for Subeclipse plugin
Now appear to me the possibilities to dowload some packages divided into the following categories: Subeclipse and SVNKit, I have installed all the packages that are into these categories.
Now I would import in my workspace a project that are on a SVN server and I do the following operation:
File ---> New ---> Project --> SVN ---> Checkout Projects from SVN ---> click on Next button ---> Create a new repository location ---> here in the URL field I insert the address of my SVN repository and click on the Next button
So now appear to me the following error screen that say to me that I have not the required JavaHL Library:
The error message say that:
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/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
I have tryied to download it from the Eclipse "Install new software" wizard but seems not exist here...
What can I do to install it on my Ubuntu 12.04 system?
Tnx
Andrea
Upvotes: 1
Views: 7642
Reputation: 6479
How do I get JavaHL?
libsvn-java
so you can just run this command to install the library:$ apt-get install libsvn-java # Use sudo in Ubuntu
$ find / -name libsvnjavahl-1.so # Use sudo in Ubuntu
Although the library is installed, you still have to tell Java (when used for Eclipse) where to find it. The JVM on Linux does not look in a lot of the standard locations to find the libraries. (This could obviously change in the future.) For example, 32-bit Debian/Ubuntu uses a standard location of /usr/lib/jni for libraries to be used from Java. However, the Oracle JVM does not currently look in this location. The easiest way to tell Java where to find the JavaHL library is to specify the following when starting the JVM:
-Djava.library.path=</path/to/library>
Example:
-Djava.library.path=/usr/lib/jni
Eclipse provides its own mechanism for providing this setting. Eclipse comes with a file named eclipse.ini. This file is looked at when the Eclipse launcher starts the JVM and appends settings to the JVM when launching it. Specifically, you should see a line that says "-vmargs". Add a newline after this line and insert the above line to pass the setting the JVM needs. Each argument needs to be on its own line, so be sure to add a new line and then put the entire string above on its own line.
Here is an example of this file from Eclipse 3.4:
-showsplash
org.eclipse.platform
-framework
plugins/org.eclipse.osgi_3.4.0.v20080605-1900.jar
-vmargs
-Djava.library.path=/opt/CollabNet_Subversion/lib
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
Upvotes: 4
Reputation: 7863
The JavaHL library needed for the adapter does not come with Ubuntu. Use the SVNKit Client Adapter
instead. See http://www.rarejava.com/blog/2011/05/installing-subclipse-with-svnkit
But as Andrew commented I would also recommend using Subversive instead. Although you need one of the adapters for Subversive too if I remember correctly.
Upvotes: 3