Do these warnings mean that JavaFX is not installed/configured correctly for JabRef?
Messages are not initialized before accessing key: Display help on command line options
2024-05-14 20:06:42 [JavaFX-Launcher] sun.util.logging.internal.LoggingProviderImpl$JULWrapper.log()
WARN: Unsupported JavaFX configuration: classes were loaded from 'module org.jabref.merged.module', isAutomatic: false, isOpen: true
2024-05-14 20:06:45 [JavaFX Application Thread] org.jabref.preferences.JabRefPreferences.getFetcherKeysFromKeyring()
WARN: JabRef could not open the key store
I am investigating this for two reasons:
- If something is wrong with my JabRef installation I want to fix it. In particular, startup has been very slow (black window for ~10s) and performance has really been lagging (I have already followed instructions on this. Right now I am only asking if JavaFX is working as it should).
- To demystify basic installation/usage of JavaFX as a JabRef user
JabRef info
JabRef 5.13--2024-04-01--6bdcf63
Linux 6.8.8-1-default amd64
Java 21.0.2
JavaFX 22+30
System info
- Operating system: openSUSE Tumbleweed.
- OpenJDK: installed from the Tumbleweed repository.
- OpenJFX: installed from the Tumbleweed repository.
- JavaFX: SDK and jmods from gluonhq.
Variables
JAVA_HOME=/usr/lib64/jvm/java-21-openjdk-21
JAVA_BINDIR=/usr/lib64/jvm/java-21-openjdk-21/bin
PATH_TO_FX=/usr/share/java/openjfx
PATH_TO_FX_MODS=/opt/javafx-jmods-22.0.1/
Note: PATH_TO_FX
points to the Tumbleweed version. The SDK from Gluon is present in /opt/
but not added to PATH_TO_FX
(I removed it to simplify troubleshooting/experimenting).
All the javafx.something
modules required in jabref/src/main/java/module-info.java
are present on my system in the paths above. I understand that they are also installed by JabRef in any case, but I do not know in which directory.
The output of java --list-modules
does not show any javafx modules. Should they appear in this list?
Regarding the unsupported configuration warning, I have read these related/similar issues. I am posting these here to revisit myself and for the benefit of anyone else who might be fumbling around with java commands in the terminal:
Edit: the key store warning appears to be a bug (to be verified). I submitted a report on Github.
-
JabRef - Missing JavaFX libraries.
Same warning as mine, but I do not get any errors about missing libraries. -
Stack Overflow - unnamed module.
Same warning as mine, except classes were loaded from an unnamed module. I don’t think I have this problem, but the answer here provided helpful information on JavaFX modules. -
Add JavaFX jmods to java --list-modules (Stack Overflow).
Use the_JAVA_OPTIONS
variable to add modules to JVM startup. I experimented with this to see if I could add the jmods to the modules list. This was the result:
Picked up _JAVA_OPTIONS: --module-path=/usr/share/java/openjfx --add-modules=ALL-MODULE-PATH
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for /usr/share/java/openjfx/javafx.graphics-decora.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: CompileExternal.class found in top-level directory (unnamed package not allowed in module)
- Why --add-module if already on the path (Stack Overflow).
How to add modules or put them on the upgrade path. Any variations I try to add jmods to the list produces are error and fails. I don’t know if this is even necessary, but like I said, I am trying to demystify JavaFX since this has caused confusion on several occasions when I have installed JabRef on Windows or in WSL2.