How to solve failure in linking Java-based JabRef to Writer

Hello,
I have a Java-based program, JabRef, which requires L.O. Java support. In particular, JabRef needs these files:

I have Writer

Version: 7.1.2.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 16; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Ubuntu package version: 1:7.1.2~rc2-0ubuntu0.20.04.1~lo3
Calc: threaded

with the installed java runtime environment:

But when I try to connect JabRef to Writer, I get the error:

image description

How can I solve this issue?
Thank you

JabRef needs these files:

Path to OpenOffice/LibreOffice library dir    /usr/share/java/unoil.jar

Are you sure you entered the path to LibreOffice library dir there? Given that you have quite informative error message, showing you what it tries to do with your entry:

Error message: File not found: /usr/share/java/unoil.jar/program/classes/unoil.jar

So it’s clear that the tool takes the string, expecting it to point to LibreOffice library install path (e.g., /usr/lib/libreoffice on my Ubuntu), and appends /program/classes/unoil.jar to it, expecting to produce a correct full path to the unoil.jar file itself. It does not expect you to point to the file.

I get the location of unoil.jar as:

$ locate unoil.jar
/usr/lib/libreoffice/program/classes/unoil.jar
/usr/share/java/unoil.jar

but if I try to point to these manually, I still get the error that the files are not found. In fact, JabRef is already pointing to /usr/share/java/unoil.jar. If I point to /usr/lib/libreoffice/program/classes/unoil.jar I get the error as shown here:

link text

(which gives a weird double path value).

OMG. I had even shown what you should put there: not /usr/lib/libreoffice/program/classes/unoil.jar, but simply /usr/lib/libreoffice. The tool will add everything necessary itself.

which in fact does not work

but you never told you tried that; never posted an image with the correct settings entered into the dialog, and the error message displayed in that case.