How can I use AdoptOpenJDK as the JRE?

Using LibreOffice 6.2.0.3 on Windows (x64).

Installed Windows x64 version of AdoptOpenJDK 8.

In LibreOffice, I go to Tools->Options->LibreOffice->Advanced, and select to use a Java runtime environment (JRE).

I click the Add button to add a JRE, and navigate to C:\Program Files\AdoptOpenJDK.

I click OK when on the AdoptOpenJDK directory or any of its subdirectories (including jdk-8.0.202.08\jre), and LibreOffice gives me this error message:

The folder you selected does not contain a Java runtime environment.
Please select a different folder.

Please advise as to how to use AdoptOpenJDK’s JRE as a JRE for LibreOffice. Is this possible?

The answer is “There’s no version 6.x”. Each “x” is just as important as that “6”. And so - versions 6.1.5 and 6.2.0 support the AdoptOpenJDK.

Updated to 6.2.0.3. Same problem persists.

Ah! I see now. 6.2.0.3 was finally built at 2019-01-24 (see Index of /pre-releases/win/x86_64/); and the backport to 6.2.0 was done at 2019-01-25, i.e. too late to appear in 6.2.0. So, in 6.2 branch, it will only appear in 6.2.1 (already available in pre-releases).

AdoptOpenJDK support is added in versions 6.2 and 6.1.5. See this commit and its cherry-picks.

Also Amazon Corretto support is added in 6.3.

Updated to LO 6.2.0.3. Problem persists.

Thank you, confirmed working on 6.1.5.

Will Amazon Corretto support be backported to anything, or will we need to wait for 6.3?

I don’t plan to backport it anywhere. But anyone interested is welcome to prepare a backport change and submit to gerrit for review.

How did you get LibreOffice to accept AdoptOpenJDK? I couldn’t get it to work on LibreOffice 6.1.5.2 (x64). I also tried the latest version of the “early adopter” path within the past 2 days. I believe it was version 6.2.3. I couldn’t get it to work either. I thought at first I was using the wrong version (64-bit instead of 32-bit), but Bill’s response indicates that he was using the 64-bit version as well, because his installation directory is likely for the 64-bit version.

I’ve already tried AdoptOpenJDK 8 and 11, and both paths of LibreOffice (the 6.1.x path and 6.2.x). I would have given up already if not for evidence that it should be supported. Is this some kind of bug?

@Catapult: “I couldn’t get it to work” is not a proper description of the problem. What exactly do you see? on which OS? entry absent in installed JRE list? entry present, but giving errors? which? at which moment? etc.

Sorry, I forgot to mention that the error I get is the same one the original poster gets: “The folder you selected does not contain a Java runtime environment. Please select a different folder.” I get this error in Windows 10 when I go to Tools/Options/Advanced/Add…, then pick the AdoptOpenJDK folder with javaw.exe. I tried adding the folders for both AdoptOpenJDK 8 and AdoptOpenJDK 11. I got the same error for both folders. I even tried the folder containing the folder with javaw.exe. Same error. Because the error prevents me from adding the runtime environment, no entry ever shows up on the list.

Please provide:

  1. Full information from LO Help->About;
  2. Full file name of the AdoptOpenJDK installer that you have installed.
  1. Output from LO Help->About:
    Version: 6.1.5.2 (x64)
    Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
    CPU threads: 12; OS: Windows 10.0; UI render: default;
    Locale: en-US (en_US); Calc: CL

  2. File names of both AdoptOpenJDK installers I have installed:
    OpenJDK8U-jre_x64_windows_hotspot_8u212b03.msi
    OpenJDK11U-jre_x64_windows_hotspot_11.0.3_7.msi

For OpenJDK 8, I tried adding these file paths to LibreOffice and failed with both with the error I listed above (…“does not contain a Java runtime environment”):
C:\Program Files\AdoptOpenJDK\jre-8.0.212.03-hotspot\bin
C:\Program Files\AdoptOpenJDK\jre-8.0.212.03-hotspot\

For OpenJDK 11, I tried these and again failed with the same error:
C:\Program Files\AdoptOpenJDK\jre-11.0.3.7-hotspot\bin
C:\Program Files\AdoptOpenJDK\jre-11.0.3.7-hotspot

Hi

I confirm the problem (same releases LibO & java) on windows7/64 (2 PCs). I tried with OpenJDK8U-jre_x64_windows_hotspot_8u212b03.msi and also by downloading OpenJDK8U-jre_x64_windows_hotspot_8u212b03.zip and unzipping it in the Java folder.

Regards

Yes, confirmed.

Please file a bug report. Actually, given the recent changes in JVM detection that were committed after 6.1.5 release, it’s possible that following releases will detect it properly.

Thank you @mikekaganski

Bug report: ( tdf#125007

Regards

Hi

Verified WORKSFORME on windows 7/64 & Version: 6.3.0.0.alpha1+ (x64)
Build ID: f5b9590fc06811a9dff550c6998d1d1088507e23

Regards