Grassland Science Group

Connecting JabRef with LibreOffice

Notes from Werner Eugster, ETH Z├╝rich

I use JabRef to organize my literature data both for use with LaTeX and with LibreOffice. JabRef stores the information in the BibTeX format and hence is easily accessible to LaTeX, but I tend to struggle with the connection between JabRef and LibreOffice. It appears that some downloads and information are not available (anymore) or I misunderstand things. Thus, here I report on how I succeeded with JabRef 2.9 and LibreOffice to allow me to send literature entries from JabRef to LibreOffice. I did this on a Mac running Mavericks, but the information may also be helpful for Linux users.

1. Preparing LibreOffice

For the connection between JabRef and LibreOffice to work you must have a Java Runtime Environment. To test whether this is present go to the menu

Preferences > LibreOffice > Advanced

This opens the Java options panel. The checkbox "Use a Java runtime environment" must be checked. In the field below that entry under the title "Java runtime environments (JRE) already installed:" you should see at least one entry shortly after having opened the menu. There is a delay since LibreOffice actually checks for a JRE. In my case, one line is shown saying

Apple Inc. 1.6.0_65

and the round checkbox is checked. Thus, my LibreOffice seems to be ready for a connection.

2. Preparing JabRef

I actually use JabRef 2.9.2 as a MacOS app (not the jar version). However, in previous attempts I had the impression that it does not matter whether I use the app or the jar version, but what mattered was that both JabRef and LibreOffice must be either 32-bit or 64-bit applications. I never succeeded to e.g. run a 32-bit LibreOffice with a 64-bit JabRef on Mountain Lion, but with Mavericks I did not even get an issue about this. Maybe now on Mavericks it is clear that all applications run in 64-bit mode.

But we need a plugin to connect to LibreOffice. The plugin seems to be quite old and written for OpenOffice, but it actually works for LibreOffice as well. In principle on the JabRef homepage there exists a version 0.9 of that plugin, but I was unable to locate and download it, hence I reused version 0.7.2 that worked with LibreOffice 3.x and actually succeeded with this one.

The name of the plugin is net.sf.jabref.oo.ooplugin-0.7.2.jar which I copied here for download. The original location is given under Links at the bottom of this page.

In JabRef use the menu Plugins > Manage plugins and install the downloaded version of net.sf.jabref.oo.ooplugin-0.7.2.jar with the "Install plugin" button.

after that you must quit JabRef and restart it. Now you should see an OpenOffice panel; if not, activate it under Plugins > Manage plugins. In my case it looks like this:


3. Test Connection and Fixing Paths

Actually, we now want to test the connection, but the paths to two jar files of LibreOffice is different from what this plugin expects. Moreover, it does not automatically detect the connection to LibreOffice automatically. Follow these instructions to test and fix the issues:
  1. Open LibreOffice
  2. Open a writer document within LibreOffice (to which we will establish the link); this can be an existing document or an empty one
  3. Now press the right one of the two buttons that are identical land look like power plugs (the left one is the autodetection and won't work).
  4. A popup appears and asks for the "Path to OpenOffice directory"; actually you want to specify the path to the LibreOffice application. You can use the Browse button to get there, or key in the absolute path. In my installation this is /Applications/
  5. A message popup most likely now tells you that JabRef could not connect to running OpenOffice and provides an Error messsage saying that the following file was not found: /Applications/
  6. now you must become superuser to fix this
  7. go to the /Applications/ directory and find unoil.jar; in my installation the following steps were necessary (in Terminal shell) to make a symbolic link to unoil.jar:
    • cd /Applications/
    • mkdir basis-link
    • cd basis-link/
    • mkdir program
    • cd program/
    • ln -s ../../MacOS/classes .
  8. Now resume your work at step #3 above. You now will get another message popup saying that jurt.jar could not be found.
  9. As in steps #6 and 7 you can fix this like this:
    • cd /Applications/
    • cd basis-link
    • ln -s ../ure-link .
  10. Now resume your work at step #3 above and you should succeed.
If you were successful to establish the connection with LibreOffice, then the status link (bottom of LibreOffice writer window, left side) will tell you:

Status: Connected to document: Untitled 1

(where the name of the document of course depends on which document name you used; in my example it was an empty document without a given name, hence "Untitled 1").

Now we're in business. Mark a literature entry in JabRef and press the "Cite" button to see a citation appear. For the citation in the screenshot I get the the following:


The style of course depends on the style you selected under "Select style", but the gray shade tells you that this is a special field. It is not protected (as e.g. Endnote fields in MS Word), so you could modify the entry which has advantages and disadvantages.

Links (to be updated - currently copied from my home page only)

Last updated 14 April 2015 by Werner Eugster