"Failed to launch JVM" error prevents JabRef to startup

Hi! New to JabRef!

I’ve installed JabRef-5.0.msi in a Dell XPS 13 running Windows 10 Pro Version 10.0.18363 Build 18363.

Java available as per:

PS C:\Program Files\JabRef\app\mods> java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) Client VM (build 25.241-b07, mixed mode)

Java variables set up as per:

JAVA_HOME                      C:\Progra~2\Java\jre1.8.0_241
JRE_HOME                       C:\Progra~2\Java\jre1.8.0_241

When I try to start JabRef, I get a windowed error saying “Failed to launch JVM”. Other applications requiring a Java runtime environment run fine in the same box (JOSM, some R packages,…)

Please, could help me with this issue? Thanks!

Hi,

there is something wrong with your installation.
JabRef ships with it’s own version of the jdk (java 14) and is no longer startable as jar.
You have to start JabRef with the exe (JabRef.exe)

Thanks for your answer, @Siedlerchr! This is the way I’m trying to start JabRef: by using the shortcut created on my desktop upon installation or by clicking in the JabRef.exe file.

PS C:\Program Files\JabRef> ls *.exe
    Directory: C:\Program Files\JabRef
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       06/03/2020     07:55         139776 JabRef.exe
PS C:\Program Files\JabRef>

I think I see JabRef’s Java runtime environment in the /runtime folder, but I’ve no idea about why JVM is not able to launch. Perhaps some level of protection in my Windows 10 environment? Please, could you propose any idea? I’ve installed JabRef twice to no avail! Other Java applications run fine in this same box.

Thanks for your time!

Hi,

this is totally odd. Could you please try the JabRef.bat file in C:\Program Files\JabRef\runtime\bin?
If it doesn’t help you could try to test the portable version and extract it to a local folder, for example C:\Users<username>\Downloads

1 Like

Hi! Same problem! But the source of the issue has being identified! See:

Loading library api-ms-win-core-handle-l1-1-0 from resource failed: java.lang.UnsatisfiedLinkError: C:\Users\Ricardo Rodrguez\.openjfx\cache\13.0.2\api-ms-win-core-handle-l1-1-0.dll: Can't find dependent libraries
java.lang.UnsatisfiedLinkError: C:\Users\Ricardo Rodrguez\.openjfx\cache\13.0.2\api-ms-win-core-handle-l1-1-0.dll: Can't find dependent libraries

The same happens both with the “installed” and the portable release copied to c:\. The point is that my username has an “í”, and the path to the libraries is misconstructed. See below:

C:\JabRef\runtime\bin>cd "C:\Users\Ricardo Rodrguez\.openjfx\cache\13.0.2\"
The system cannot find the path specified.

C:\JabRef\runtime\bin>cd "C:\Users\Ricardo Rodríguez\.openjfx\cache\13.0.2\"
C:\Users\Ricardo Rodríguez\.openjfx\cache\13.0.2>

This accented vowel is causing me a lot of problems! But I can’t reinstall my box now avoid it. Please, how could I fine-tune the way JabRef construct the path to the libraries to workaround this issue?

Thanks!

You should be able to specify the cache folder using javafx.cachedir as described here https://github.com/JabRef/jabref/issues/5817#issuecomment-571218752. Hope this helps

Hi,

thanks for your reply! Seems like you ran into this or a similar bug
https://bugs.openjdk.java.net/browse/JDK-8205991

1 Like

Thanks! I’m now able to launch JabRef! Here my current JabRef.bat file’s content:

C:\Program Files\JabRef\runtime\bin>cat JabRef.bat
@echo off
set DIR="%~dp0"
set JAVA_EXEC="%DIR:"=%\java"
pushd %DIR% & %JAVA_EXEC%  -p "%~dp0/../app" -Djavafx.cachedir=C:\\Temp -m org.jabref/org.jabref.JabRefLauncher  %* & popd

C:\Program Files\JabRef\runtime\bin>

It works, but the only way I found to start it is to open a cmd or a PowerShell session, navigate to the folder and call JabRef.bat. If I click on its icon on the Explorer, it fails. Well, I can survive until a new Java release solves this issue or JabRef’s team enables a way of moving the cache folder outside the user’s folder! But, have I currently any option to create a shortcut to JabRef available, let’s say, in my toolbar?

Thanks!

Yes! It seems so! I’m suffering this issue not only with Java programmes, but also compiling R libraries, for instance! As far as I can see, I can’t vote or watch this issue in JDK Bug System. I’ll keep an eye on this issue looking for a new release solving this issue. Thanks!

@rrodrigueznt Glad to hear that it’s working now. You could try to modify the desktop shortcut and point it to the .bat file instead of the exe. That should work

1 Like

It did the trick! My desktop shortcut points now to "C:\Program Files\JabRef\runtime\bin\JabRef.bat" while starting in "C:\Program Files\JabRef\" and JabRef starts! Thanks!

1 Like

I had this problem. While reading this thread, a kind of “browned out” jabref icon appeared on the tray(?) and I clicked it, and it now appears to be working. Hooray!