cognitive science
and more
How to solve Java issues with Zotero/ OpenOffice on Linux

A colleague of mine just installed Zotero and he reminded me of a particularly nasty issue that affects Zotero on most modern Linux distributions. I believe it affects at least all recent versions of Ubuntu, Fedora and OpenSUSE. The problem stems from the fact that the Sun implementation of Java has been replaced with the open source OpenJDK kit, which does not play nice with Zotero. The symptoms are confusing error messages when you try to use Zotero from within OpenOffice.

The solution is to remove all OpenJDK packages and install Sun java. In Ubuntu you can do this by opening the Synaptic package manager under System → Administration → Synaptic package manager, searching for openjdk and icedtea and removing all matching packages that you have installed. Next you search for sun and install the following packages: sun-java6-bin, sun-java6-jre and sun-java6-plugin. Next, restart Firefox and OpenOffice and you should be good to go!

Update Jan 3 2011: In order to install Sun java you need to enable the Canonical partner repository in Ubuntu. If it isn't enabled already, you can do so by opening the Synaptic package manager (Menu → System → Administration → Synaptic Package Manager), opening the Software Sources (Menu → Settings → Repositories) and enabling the Canonical Partners repository (Other Software → Canonical Partners).