Failed to load JVM

Hi,
I try to start my cryptomator and it fails with the popup “Failed to load JVM”
I tried to reinstall, I deleted the old settings files.
So that doesnt wrok.
After checking the forums I was looking at the log-file which is empty. So i have no idea where to find a solution.

Jochen

Seems that there’s an issue with your installed java.
Which java version do you have installed? If latest, did you try a reinstallation?

Yeah I reinstalled. No change.
I also came across a post that states cryptomator works on one user on windows 10 and not on another one.
So i just switched my pcs accounts and it seems to run perfectly there?
How can this happen?
So its obviously not related to Java itself.

Hey, would you mind running C:\Program Files\Cryptomator\Cryptomator.exe (or wherever you’ve installed it) from the command line? This should tell us some more specific error (hopefully). :wink:

I’m having the same issue. Cryptomator only runs if I switch to the administrator user, not under my account. I’ve successfully run it before but since I upgraded I can’t run it. I’ve tried various troubleshooting steps, nothing works. Did you resolve this?

From what version did you upgraded?

And can you try the suggestion made by @overheadhunter and report back?

I upgraded from 1.5.4. Yes, I’ve run the exe from the cmd line but nothing more than just the Failed to launch JVM dialog box.

Darn. In general, Java always throws a really meaningful exception, but according to this SO thread, it can be surpressed/hidden sometimes. We need this exception to find the root problem.

A way which can reveal it, is using the buildkit-releases of Cryptomator. What you need to is:

  1. Install a JDK 14 ( I suggest AdoptJDK)
  2. Download buildkit-win.zip from our release page
  3. Extract zip-archive
  4. Open the file launcher-win.bat with a text editor and add the following line after -Xmx512m ^:
-Dprism.verbose=true ^
  1. Save the change and start this file with a double click

Running the launcher-win.bat from the buildkit works fine and the app opens w/o any issue. Some sort of registry/permission issue when running it normally preventing the JVM from loading?

Maybe. Looking at the web for the error message “Failed to launch JVM” gives a whole bunch of possible fixes. And without any details what’s causing it, i actually don’t know what to suggest :pensive:

The problem lies clearly in the binary packaging of Cryptomator (i.e. that in the end you’ll only need to start an .exe file). I’ll see if I can build a tiny Java app and package it to a binary, maybe this can help narrowing it down.

And done. You can download the applicatione (artifact) here:
https://github.com/skymatic/jpackage-helloworld/actions/runs/131149140

Unpack the zip archive somewhere and execute helloJPackage.exe. A cmd window should open with its title saying “Hello JPackage!”. To close the app, just close the terminal.

If this test succeeded, i’ll ask you to try a JavaFX test app (JavaFX is the used graphics framework of Cryptomator).
If this test is unsuccessful, please do the following:

  1. Open the file ./app/helloJPackage.cfg with a text editor
  2. Add to the section [JavaOptions] the line -Xlog:all=debug:file=jvm.log
  3. Try to start the application again
  4. Afterwards you can notice that the file jvm.log is created inside this app directory
  5. Send us this log file (e.g. upload it with Firefox Send and send me a PM)

The cmd window opened successfully with the title.

Okay, this means that the basic packaging works.

So, let’s head to debug phase two. The following link leads to a javaFX test application, packaged as a binary:

Download javafx-helloworld-package-windows-latest-SNAPSHOT, extract the archive and start the application javafx-helloworld.exe.

The expected result is, that a window with some text, a button and a text box should open.

If this does not happen, do the steps i wrote in my last post and send the result. (This time the file is called javafx-helloworld.cfg).
If this works, the only straw i see to find out the problem is to debug the main application.

I ran the process and the window, text, button and text box displayed correctly.

As mentioned, the app runs fine when I sign in under the administrator account. Under my own local user account (part of administrator group) is where I encounter the JVM issue. Is it likely that there are some corrupt registry entries?

Ah, sorry, completely forgot that it works as an admin.

I don’t think its related to the registry. Cryptomator writes an install/uninstall entry into the registry. But there might be other things.

What is more plausible for me is a permission problem. What happens when you install Cryptomator somewhere into your user directory?

I first installed it in my user directory and get the same error. I then installed it in the Administrator directory and still have the same issue. It only works if I log into Windows under the administrator account.

Since i’m out of ideas, lets debug Cryptomator directly.

Same procedure as for the other two tests. In the following [CRYPTOMATOR] needs to be replaced with the installation directory of Cryptomator and [USER] with the path to your home directory

  1. Open the file [CRYPTOMATOR]/app/Cryptomator.cfg with a text editor
  2. Add to the section [JavaOptions] the line -Xlog:all=info:file=[USER]/jvm.log (note that this time it points to your home directory)
  3. Try to start the application again
  4. Send us the log file

I sent you a PM with the log file link

By coincidence, do you have any accessiblilty tools installed, e.g. a screen reader or something similar? We have an old issue on our bug tracker where Cryptomator does not start if such is present on the system:

Nope, no accessibility tools installed.