Economy of Effort

Twitter LinkedIn GitHub Mail RSS

Upgrade To Karmic: Subclipse (Eclipse Svn Plugin) And 64 Bit Java Hl

This isn’t about the Jaunty 9.04 -> Karmic 9.10 Ubuntu upgrade so much as it is about running Eclipse on 64-bit Linux. But I encountered it on my upgrade path, and so it gets posted here.

I was having an error with the Subclipse SVN plugin for Eclipse. Specifically, when I tried a merge operation, I got:

SVNClientException: org.tigris.subversion.javahl.ClientException: svn: Cannot create new file '/tmp/(blahblahblah)...'

The problem was that Subclipse only comes with the 32-bit version of JavaHL. I confirmed JavaHL was not present by going to Window -> Preferences and browsing to Team -> SVN. In the SVN Interface dropdown, it said “JavaHL(JNI) Not Available”.

If you’re on 64-bit Linux and using a 64-bit JVM, you need to provide JavaHL yourself. It can be installed by:

$ sudo aptitude install libsvn-java

… but you have to tell Eclipse to look at the location where the JNI will be installed (/usr/lib/jni). This can be done by editing eclipse.ini and adding the line “-Djava.library.path=/usr/lib/jni” under “vmargs”.

So the eclipse.ini file would look something like this:

(... some junk ...)
(... possibly more junk ...)

Basically, you’re looking for the line “-vmargs” and inserting the “-Djava.library.path=/usr/lib/jni” as a new line immediately underneath it. If you actually paste “some junk” into your eclipse.ini file, tell me about it and I will laugh at you.

Save and re-launch Eclipse, and you should see the JavaHL version in that SVN Interface dropdown box.

Reference: Subclipse wiki page.