Jabref: Unable to start jabref 4.2 on Ubuntu 17.10 standard installation after "update"

Created on 27 Apr 2018  路  6Comments  路  Source: JabRef/jabref

JabRef version 4.2 on Ubuntu 17.10

Steps to reproduce:

  1. Download the JabRef 4.2
  2. Unpack the jar on /usr/share/jabref
  3. Remove the previous link on /usr/share/java/jabref pointing to /usr/share/jabref/JabRef-3.8.2.jar to the new /usr/share/jabref/JabRef-4.2.jar
  4. Running java -jar /usr/share/jabref/JabRef-4.2.jar starts the program with some warnings

    File: grouptree.fxml not found, attempting with camel case
    File: grouptree.css not found, attempting with camel case

    However, running using the jabrefscript from /usr/bin/jabrefthrows an error

    Error: Could not find or load main class net.sf.jabref.JabRefMain

    But, as you see from the previous run openjfx is installed.

linux

All 6 comments

Your start script seems wrong, the main class must start with org.JabRef
Normally the command java - jar JabRef.jar is sufficient

It is the standard script on Ubuntu 17.10 that starts /usr/bin/jabref

The contents are

#!/bin/sh

# Include the wrappers utility script
. /usr/lib/java-wrappers/java-wrappers.sh

# We need a java8 runtime
find_java_runtime java8

find_jars \
    jabref \
    bcprov \
    antlr3-runtime \
    antlr4-runtime \
    com.android.json \
    commons-cli \
    commons-codec \
    commons-lang3 \
    commons-logging \
    fontbox \
    glazedlists \
    guava \
    httpasyncclient \
    httpclient \
    httpcore \
    httpcore-nio \
    httpmime \
    java-string-similarity \
    jempbox \
    jgoodies-common \
    jgoodies-forms \
    jgoodies-looks \
    jhlabs-filters \
    jsoup \
    juh \
    jurt \
    log4j-api \
    log4j-core \
    log4j-jcl \
    microba \
    mysql-connector-java \
    pdfbox \
    postgresql \
    ridl \
    spin \
    swingx \
    swing-layout \
    unirest-java \
    unoil

run_java net.sf.jabref.JabRefMain "$@"

All JabRef classes are in the org.jabref package starting from JabRef 4.0.

So net.sf.jabref.JabRefMain is now org.jabref.JabRefMain

@koppor Is this a global script distributed with Ubuntu?

JabRef 4.x is not yet packaged for Debian. So it is not available in Ubuntu. Please see https://github.com/koppor/jabref/blob/master/jabref-in-debian.md for the current status and feel free to help. Unfortunately, it is a long road to go. So, you have to adapt the script on your own.

We also have been working on a SnapCraft image (https://github.com/JabRef/jabref/issues/3121), which allows for recent JabRefs to be running on Ubuntu. We stopped working on that, because of lack of time. In case you would volunteer to work on it? SnapCraft is said to got better the last year, although https://bugs.launchpad.net/snapcraft/+bug/1718105 is still not fixed.

Changing the start to run_java org.jabref.JabRefMain "$@" solves the problem. So, relinking is not enough (my manual "update") but also need to change the script (/usr/bin/jabref).

Still getting a message

File: grouptree.fxml not found, attempting with camel case
File: grouptree.css not found, attempting with camel case

Which I expect is Ok.

@adinriv Yes, these are just coming from an external library, you can ignore them.
So I will close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Siedlerchr picture Siedlerchr  路  37Comments

LyzardKing picture LyzardKing  路  62Comments

glennib picture glennib  路  34Comments

tobiasdiez picture tobiasdiez  路  39Comments

Codeberg-AsGithubAlternative-buhtz picture Codeberg-AsGithubAlternative-buhtz  路  32Comments