I've tried installing JabRef via the Ubuntu Software GUI (18.04). There are two jabref's listed in there: "jabref" (says Version 4.2-dev) and "JabRef" (Version 3.8.2+ds-3).

"JabRef" opens fine and seems to work, but the DOI search doesn't ("error while fetching from doi. invalid url")

"jabref" installs fine, but doesn't open when clicked.

Finally I downloaded the latest version from their website (JabRef-4.3.1.jar), sadly I get the following result:

bruno@bruno:~/Desktop/Jab$ java -jar JabRef-4.3.1.jar 
Error: Could not find or load main class org.jabref.JabRefMain
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

If I simply right-click on it and click "Open with OpenJDK 8 Java Runtime" or "Open with OpenJDK 11 Java Runtime", again nothing happens ... Does someone know a solution?

1 Answer 1


Based on https://stackoverflow.com/questions/55162858/cannot-run-jar-on-ubuntu-with-jfx

I tried java -jar --module-path /usr/share/openjfx/lib --add-modules=javafx.controls,javafx.fxml ~/Desktop/JabRef-4.3.1.jar with openjdk 8 and openjfx 8 packages removed, and 11.0.2 (openjfx) and 11.0.3 (openjdk) installed

This reports that Java 9 is not supported, which AFAICS means 11 is not either.

Trying wget https://builds.jabref.org/master/JabRef--master--latest.jar and java -jar --module-path /usr/share/openjfx/lib --add-modules=javafx.controls,javafx.fxml ~/Downloads/JabRef--master--latest.jar gives

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
13:27:43.069 [JavaFX Application Thread] ERROR org.jabref.logic.l10n.Localization - Messages are not initialized before accessing key: Your current Java version (%0) is not supported. Please install version %1 or higher.

This suggests using openjdk and openjfx 8 is the only way to make this work as of writing (21st June 2019), so I'll try that.

Based on https://bugs.launchpad.net/ubuntu/+source/openjfx/+bug/1825054/comments/13

apt install openjdk-8-jdk=8u162-b12-1 openjdk-8-jre=8u162-b12-1 openjdk-8-jdk-headless=8u162-b12-1 openjdk-8-jre-headless=8u162-b12-1
apt-mark hold openjdk-8-jdk openjdk-8-jre openjdk-8-jdk-headless openjdk-8-jre-headless
apt remove 'openjdk-11*'
apt install libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx=8u161-b12-1ubuntu2
apt-mark hold libopenjfx-java libopenjfx-jni openjfx
apt install libcanberra-gtk-module # optional, I think

Then java -jar ~/Downloads/JabRef--master--latest.jar starts, as does java -jar ~/Downloads/JabRef-4.3.1.jar, though the latter complains about the Java version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .