During the installation of the Subclipse SVN plugin for Eclipse Luna on my Ubuntu 15.04, I ran into problems installing the JavaHL SVN interface. (Failed to load JavaHL library)
According to Subclipse' FAQ about JavaHL troubleshooting for Linux you have to add the following line to your eclipse.ini
-Djava.library.path=</path/to/library>
In my case the path is /usr/lib/x86_64-linux-gnu/jni
While this solves the original problem it potentially creates new ones since it overwrites whatever there is in java.library.path
(in my case /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
).
So my question is what to write into eclipse.ini
instead, to prepend the old state of java.library.path
by an additional path.
N.b.: I don't know how the java library path is imputed nor do I want to know. I also don't want to hard code the final value.
After some more research and a few discussions with friends and colleagues, it seems that automatically extending the default java.library.path
in eclipse.ini
isn't possible. It seems you need to hard-code it.
I believe, however, just overwriting the old configuration is an undesirable way to go; one should at least extend the existing path. The following is a short description on how it was done on my system.
First, before modifying eclipse.ini
(i.e. without the -Djava.library.path=...
line), run eclipse, in the menu click "Help"->"About Eclipse", click "Installation Details", click on the tab "Configuration", wait until "retrieving system information..." disappears, scroll down to the second page and copy the line containing the java library path (in my case it is java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
).
Second, close eclipse, open eclipse.ini
, and append a line like -Djava.library.path=<added path>:<previous path>
. In my case this boils down to the line -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
.
Third, start eclipse again and check in the "Configurations" tab if the new path was properly set.
After this procedure my SVN plugin is working as desired. One hast to remember though to check the java.library.path
settings manually in case there are relevant changes to the system.