Tuesday, 7 February 2012

Fixing "Incompatible JavaHL library loaded" error on Mac OSX

So you use Eclipse on your Mac and you want to work with a Subversion version control system, so you installed Subclipse and everything seemed fine... and maybe it even used to work OK last time..., but now, today, when you need it most - you get an error that says:
Incompatible javaHL library loaded
and it probably says version 1.7 too.

Whats happening is that the subversion files you are trying to work with are at a more recent version than you have available locally. Here's how to fix it.

  1. Make sure you have latest Subclipse installed, go to the Subclipse site, click on Download and Install, grab the appropriate Eclipse update URL, then in Eclipse, go to Help, Install New Software, and add that URL as a new update site. After it loads, select everything it offers and finish the install. Here is the Eclipse update site for version 1.8
  2. Now we need to install Subversion client binaries on your machine, Collabnet don't have the latest but luckily UberSVN do, so go to the UberSVN download page, select the OSX tab, then click to download the Subversion Client 1.7.2. Note: it's not that big blue call to action button! It's the links below. Once you have the client, go ahead and install it.

  3. Quickly add Subversion to your path, I do this by editing ~/.profile and adding
export PATH=/opt/subversion/bin:$PATH
Restart Eclipse, and with an ounce of good fortune, Subversion and Subclipse now work again.

One last note: if, just like me, you found that big blue call to action button on UberSVN's download page just too tempting to resist... there is an unofficial (but seems to be written by a UberSVN's developer) Mac OSX UberSVN uninstaller script to tidy that up.
Worked a treat for me.