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 ...) -vmargs -Djava.library.path=/usr/lib/jni (... 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.
While this works to see the contents of a repository, it crashes eclipse for me with a SIGSEGV (C [libpango-1.0.so.0+0x24f7a] pango_layout_new+0×2a) when checking out a directory. Switching to svnkit seems to work fine for now. Is there any drawback to that?
Comment by Stefan — 11/2/2009 @ 3:15 pm
Hi!
Installing libsvn-java is also helpful(and maybe required) for running subclipse “properly” on i386.
I had very strange effects(instead of bold failures that made me realize what’s wrong more clearly) on team synchronizing until I switched to the proper 1.6, javaHL libs, and installed the here mentioned libsvn-java package after upgrading from Jaunty to Karmic using eclipse 3.5 from eclipse.org (as opposed to packages from ubuntu…)
Comment by henning — 11/15/2009 @ 5:07 am
Adding the line to eclipse.ini made it work like a charm. Thanks!
Comment by Trond — 12/17/2009 @ 4:53 pm