Failed to load JVM

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 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:

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.

My final guess is that the Java Access Bridge was once enabled and never disabled. When I enable it on my system, Cryptomator refuses to launch with the “correct” error message. Additionally, the created JVM logs are very similar.

To disable Java Access Bridge, run the following command (where %JDK_HOME% is the directory of your JDK):

%JDK_HOME%\bin\jabswitch -disable

Fingers crossed, that this works :sweat:

Progress! I disabled the Java access bridge and no longer get the JVM error.

The app opens up and I can successfully open an existing vault. However, when the drive doesn’t mount and I get the “location is not available” dialog box msg (see attached).

Getting closer…

Phew :smile: Glad that it worked.

Do you mean with “open an existing vault” adding the vault to Cryptomator? Regarding the mount problem: If you are using Dokany ( look in the virtual volume tab in the general settings), this message is shown when you try to access the vault with admin priviliges. For more info, look at the topic Cryptomator on Windows: Accessing your vault with admin priviliges.

An alternative to Dokany is WebDAV. It works quite stable, but has some Windows specific drawbacks (due to its really bad implemenation) like that the file size is limited to 4GB, it is slow, filepath limit of 260 characters…

It’s odd because I am accessing the vault under my own user account and not running it under admin. I revoked admin permissions at the \program files\cryptomator root level and still get the mounting error. I removed the string --options CURRENT_SESSION as per the article and all is good. I’ll stick with that approach to get my other vaults up and running. Thanks for your help!

© 2020 Skymatic GmbH • Privacy PolicyImpressum