Thursday, June 27, 2013

Updating JabRef

I rely on JabRef to created and edit bibliographic databases (for use with BibTeX in LaTeX documents). For whatever reason, the supported version in the Canonical repositories for Ubuntu (and Linux Mint) is lagging further behind than is usual for the repositories (which is saying something). The current stable version (as of this writing) is 2.9.2, while the current beta version is 2.10 beta 2. The "official" version in the repositories is 2.7 beta 1, which I estimate to be between 12 and 18 months old.

I looked around for more current Debian packages but ultimately decided the easiest way to update is manually. Most of the files from the official version do not need to be changed. Here are step-by-step instructions for installing a new version. They worked for me and should work for anyone else using a Linux distribution that employs the Debian packaging system. I assume here that you already have the "official" version of JabRef installed. Do not uninstall the old package, since we're going to retain a lot of its files.
  1. Download the latest version (stable or beta, your choice) from the SourceForge project page. Henceforth I will refer to the file (whose name should be JabRef-<version information>.jar) as <new jar>.
  2. Open a terminal in the download directory.
  3. Run the command
    sudo mv <new jar> /usr/share/jabref
    which will install the new version in parallel with the old one.
  4. Optional but recommended: run
    java -jar /usr/share/jabref/<new jar>
    just to make sure the downloaded version works. Once you're sure it works, exit JabRef.
  5. Still in the terminal, run the commands
    sudo rm /usr/share/java/jabref.jar
    sudo ln -s /usr/share/jabref/<new jar> /usr/share/java/jabref.jar
    This switches the version of JabRef being executed from the old one to the new one.
  6. Test JabRef by running it from the application menu and/or by double-clicking a .bib file.
  7. Optional: run
    sudo rm /usr/share/jabref/<old jar>
    to delete the old version. 
I'm not sure whether Synaptic will identify JabRef as a "broken" package as a result of this. We'll see.

4 comments:

  1. I've followed your instructions. The openoffice options now ask that a style file be chosen (as per version 2.7) whereas if I run 2.9 from a command line the links work by default, and the openoffice dialog box shows active icons. There must be an updated openoffice file that needs to be also copied.

    ReplyDelete
    Replies
    1. I don't use JabRef with LibreOffice (in fact, I don't use LO Writer at all, other than to open the occasional Word document), so I didn't know the plugin existed. I've installed it, though, and it works without having to update any other files. It is, however, a bit flaky. Regardless of how I start JabRef (terminal or menu), the first time I start it after installing the plugin I need to click Plugins > OpenOffice.org panel, which displays the top of two panels for the plugin. The top panel has a "Select style file" button that does nothing visible when I click it (but causes JabRef to throw an uncaught exception visible in the terminal window if I started JabRef from a terminal). Now, leaving the OO panel visible, I need to close JabRef and restart it (again using either the terminal or the system menu). This time I see *two* OO panels in a vertical stack, with the second one starting with a "Select style" button. From there I can connect to an open LO document and push citations.

      As long as I leave the OO panels open when I exit JabRef, they'll both be there the next time I open it. If I close either of them, the next time I start JabRef they are both closed, and I have to open the top one and restart.

      I'm not sure whether this is a minor bug in 2.9 or what, but apparently no additional downloads are required.

      Delete
  2. I needed to switch to the new version. With your instruction I could do it easily. Thank you. Good work!!

    ReplyDelete

Due to intermittent spamming, comments are being moderated. If this is your first time commenting on the blog, please read the Ground Rules for Comments. In particular, if you want to ask an operations research-related question not relevant to this post, consider asking it on Operations Research Stack Exchange.