Menu

A Suitable Version of Java could not be found

Help
Grindlay
2018-11-01
2022-10-19
  • Grindlay

    Grindlay - 2018-11-01

    Not sure if this is a new issue with the 64-bit version on Windows, but it looks as though just having the 64-bit JDK (tested with 11.0.1) is no longer sufficient for running Davmail 64 client (tested with 4.9.0-2652).
    I had to download and install the 64-bit JRE from https://www.java.com/en/download/manual.jsp
    I tried adding the path to the 64-bit JDK in environment in my %PATH% variable but that didn't work.
    Installing the 64-bit JRE fixed the problem.

     
  • efe4itcc

    efe4itcc - 2018-12-04

    I have the same problem with a fresh install of Oracle JDK 11.0.1 LTS and davmail-5.0.0-2801-setup64. My use case is O365 with MFA and ADFS, so I need "O365Interactive with Oracle JDK 9 or later" as stated in feature-requests#111 discussion.
    So last JRE8 mentionned above is of no use for me.

    What is to be done to "patch" davmail64.exe with last release of winrun4j ?

     
  • efe4itcc

    efe4itcc - 2018-12-13

    Tweaking directly davmail64.exe with winrun4j tools did not make it.
    I finally just added a new [davmail64.ini] file in davmail installation directory, and configured the entry [vm.location=location_of_file_jvm.dll]

     

    Last edit: efe4itcc 2018-12-13
  • Mickael Guessant

    Updated the davmail64.exe in trunk, can you please check with latest trunk build ?

     
  • tkhyn

    tkhyn - 2020-09-14

    Thank you @efe4itcc your solution worked
    @mguessan this is still current with v5.5.1-3299

     
  • Mickael Guessant

    ok, so embedding the configuration inside was not such a good idea.

    The tools to update winrun4j config are available in src/winrun4j

    https://github.com/mguessan/davmail/tree/master/src/winrun4j

     
  • Stefano

    Stefano - 2021-07-27

    Same issue still exists with davmail-6.0.0-3375 - with the setup64 version, in spite of Java 64 being installed.
    But the windows standalone version works fine. So I simply emptied the installation directory, downloaded the windows-standalone version, unzipped it and moved its content into the emptied directory, and now everything works like a charm

     
    👍
    1
  • Angelo

    Angelo - 2021-08-09

    Confirmed: On two PCs I could not get it to run with any Java x64, neither Corretto, nor OpenJDK.

     
  • Mitchell F. Berman

    Thank you Stefano. Confirming that the setup64bit version does not work, even with 64bit JRE installed. Using the windows standalone version in a workaround as described by Stefano does work. I could not get the tools mentioned in M Guessant's 2020-09-14 post to work on this version.

     
  • Carsten Hütter

    Carsten Hütter - 2021-09-08

    Can confirm the issue, too. And Stefanos workaround works here as well.

    It's only affecting Windows (10); no problem in Linux (Ubuntu 20.04 LTS).

     
  • Oliver Schneider

    Hi folks, same issue here. I used AdoptJDK before (need the JDK anyway, due to another software I run) and it worked beautifully with davmail64.exe. Now I updated to the latest release - just updated no other changes on my part and it stopped working.

    So I tried installing Amazon Coretto instead of AdoptJDK and it's the same thing. davmail64.exe complains about not finding the appropriate JVM, despite the fact that it looks in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JRE, finds the subkey 11 there and I corrected the paths to point to Coretto (which evidently its installer did not do). Long story short, I can see in Process Monitor that it finds and even reads the value which contains the correct path to jvm.dll, but then I still get the dialog in which it complains about not finding a suitable 64-bit Java.

    I really don't get it.

     

    Last edit: Oliver Schneider 2022-01-20
  • Oliver Schneider

    Okay, thanks to the hint with the davmail64.ini I found an alternative workaround. Still requires manual intervention after each update of JDK/JRE or DavMail, but less intrusive than the method suggested above which requires editing the executable file resources. Not that it makes much difference, since the released file isn't signed either way, but I prefer being able to compare a binary to whatever was released and I keep track of hashes of stuff I run.

    So without further ado:

    1. open an elevated prompt (we're dealing with a normally write-protected directory)
    2. go to your DavMail installation directory, e.g. by default cd /d "%ProgramFiles%\DavMail"
    3. mklink /j jre "%JAVA_HOME%"

    That's it. We're (ab)using the preset from davmail64.ini and therefore don't have to tinker with the release files. The preset declares that the JRE will by default be searched in a subfolder jre relative to the current binary.

    NB: the above instructions assume that %JAVA_HOME% as an environment variable points to the correct Java Home. If it doesn't, the above instructions still won't work.

    Hope this helps someone else.

     

    Last edit: Oliver Schneider 2022-01-20
  • Hjourzt Fjioords

    I'm having this problem, and can follow the gist of the suggested workaround, but I am not a coder or sysadmin by trade. I am a solo business and now have to get email from an account on my client's exchange email. I don't use Outlook, do use Thunderbird. I would like to implement this, but do not fully understand the solution. But I can follow instructions very well (not a complete noob). Could someone translate these steps into something like:

    1: Open a command prompt in admin mode.
    2: Type the following: "Babblegibberbabble (the path to your Davmail.exe) ...."
    3: Etc. ?

    It would be very much appreciated!

    My final goal is to have the email account managed on Thunderbird in the same way that ExQuilla does. But first I have to convince Davmail that I am running Java64bit.

    Thanks!

     
  • Oliver Schneider

    If you mean my steps, you got point 1 right. Then inside the opened command prompt enter whatever is appropriate for your installed DavMail (I don't where you installed it and whether you picked the 32-bit or 64-bit one, which is why my above instructions are generic; if you use 64-bit DavMail as installed with default options and 64-bit Java then you needn't change a thing compared to my instructions).

    So if you installed 64-bit one then enter (or copy & paste from here): cd /d "%ProgramFiles%\DavMail".

    And then it's literally the mklink /j jre "%JAVA_HOME%" I suggested (again enter or copy & paste from here).

    Only if you have a Java runtime which doesn't set JAVA_HOME will you have to enter the full path to your Java installation manually. Otherwise it's done in these three steps.

    The DavMail configuration is then a completely different beast and depends again whether you have Microsoft 365 or classic Exchange, whether there is Multi-Factor authentication involved.

     
  • Hjourzt Fjioords

    Thank you Oliver for the instructions! However, I was not successful. This is what I did:

    1. Open a command prompt in Admin mode
    2. At the prompt, type the following (literally): cd /d "%ProgramFiles%\DavMail"
    3. Then hit "Enter"
    4. Type: mklink /j jre "%JAVA_HOME%"
    5. Hit "Enter."

    The message displayed after this was "Junction created for jre <<===>> %JAVA HOME"

    Nevertheless, when I try to start Davmail, I still get the "A Suitable Version of Java could not be found" message. The same even after re-starting.

    Do I need to re-install DavMail? I am using Java version 8.0.3210.7

    I am using 64-bit version, btw, and windows 10.

    Thanks again.

     
  • BurnBaby

    BurnBaby - 2022-10-14

    Hi,

    I keep getting this error on Windows 10 and am totally stuck. I have installed/reinstalled Java several times, different versions, but there is no progress.

    What, exactly, does DavMail consider a "suitable version" of Java?

    I tried the instructions from Oliver Schneider, above, followed by a reboot, but it doesn't resolve the problem.

    Is there a non-geek guide (i.e., simple, comprehensible instructions) somewhere that explains how to make this work?

    Also, I find no README or anything that explains the DavMail files. Am I going to be starting davmail64 or davmailservice64 or something else?

    Thanks.

     

    Last edit: BurnBaby 2022-10-15
  • BurnBaby

    BurnBaby - 2022-10-19

    Bump. I am still stuck on this. Windows 10. Un/reinstalled Java again.

    Trying "java -version" in a command window, I get:

    openjdk version "17" 2021-09-14 LTS
    OpenJDK Runtime Environment Zulu17.28+13-CA (build 17+35-LTS)
    OpenJDK 64-Bit Server VM Zulu17.28+13-CA (build 17+35-LTS, mixed mode, sharing)
    

    Launching DavMail, I only get:

    A suitable version of Java could not be found on your system.
    

    How can I fix this?

    EDIT: I finally got this fixed by setting up JAVA_HOME, and trying Oliver Schneider's suggestion, above.

     

    Last edit: BurnBaby 2022-10-19
  • Stefano

    Stefano - 2022-10-19

    This is not an issue with Java. Don't bump, please read the thread above, the solution is simple, I repeat:

    The problem is with the setup64 version, in spite of Java 64 being installed. But the windows "standalone" version works fine. So:
    1. empty the installation directory, since you have already tried to install the software
    2. download the windows-standalone version
    3. unzip it
    4. move its content into the emptied directory, and
    5. launch davmail64 .exe

    Enjoy!

     

Log in to post a comment.