• Support
  • LibreOffice can't find Java-JRE

Hello,
My LibreOffice can't find Java-JRE.
I can't install libreoffice-java.

$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+0-solus)
OpenJDK 64-Bit Server VM (build 11.0.11+0-solus, mixed mode)

What can I do?

with regards
Ch. Hanisch

You can try to set it up in Tools -> Options -> Advanced

    kyrios Hello,
    "x Use a java runtime environment" is set, but no Java- JRE is displayed.

    with regards
    Ch. Hanisch

      Hanisch Try to set JAVA_HOME before running libreoffice then go on that screen again and check if the location is set or if it is still blank.
      Otherwise, you can add it from this screen.

      You can find the location here I guess.

      Note that if you don't need java, it is better to uncheck the box since it slows down LO and most people don't need it.

      Hello,
      I have added /usr/lib64/openjdk-8 and this works well.
      With /usr/lib64/openjdk-11 don't work.

      with regards
      Ch. Hanisch

      Hello,

      I have added /usr/lib64/openjdk-8 and this works well.
      With /usr/lib64/openjdk-11 don't work.
      I have set JAVA_HOME

      $ cat ~/.bashrc | grep export
      ...
      export JAVA_HOME=/usr/lib64/openjdk-8

      In openjdk-11 is /usr/lib64/openjdk-11/jre missing.
      This missing Folder JRE is a Bug in SÓLUS.

      with regards
      Ch. Hanisch

        Hanisch This missing Folder JRE is a Bug in SÓLUS.

        Nope it is not. JRE is deprecated.

        From the JDK 11 release notes:

        In this release, the JRE or Server JRE is no longer offered. Only the JDK is offered. Users can use jlink to create smaller custom runtimes.

        2 years later

        Once in a year I need LO Base, and this wants a JRE.
        Last year it was working, I guess I had version 8 with a jre/ - folder still there, this year it's broken.

        I searched for a solution for several hours now, but can't find any.
        Java is available:
        michael@tuxolus2 ~ $ echo $JAVA_HOME
        /usr/lib64/jvm/openjdk-17/
        michael@tuxolus2 ~ $ java --version
        openjdk 17.0.9 2023-10-17
        OpenJDK Runtime Environment (build 17.0.9+9-solus)
        OpenJDK 64-Bit Server VM (build 17.0.9+9-solus, mixed mode)

        I also tried it with ver. 11, but no success.
        In the settings page of LO which is mentioned I can't add a path, because LO tells me it's not working. (I tried /usr/lib64/jvm/openjdk-17/bin and similar.) Found this thread: https://ask.libreoffice.org/t/cant-find-java-jre-windows-10/64370 from someone asking the exact same question for Windows.

        After starting from cli I get:
        javaldx: Could not find a Java Runtime Environment!
        Warning: failed to read path from javaldx

        which leads to a file named '/home/michael/.config/libreoffice/4/user/config/javasettings_Linux_X86_64.xml', which originally held links to the formerly installed version 8 of the JRE. The internet recommended to delete it, and afterwards a new one was auto-generated, but with no link to a Java runtime environment at all. I even tried to manually edit this file but with no success.

        So, is anyone here who can explain what actually to do in this case? (instead of why it's theoretically no problem)

        (please dont be mad if I can't reply. This forum is - due to the f%$#ing reCraptcha - nearly unaccessible for me. Who invited Google to restrict my involvement here???)

        It looks like the default version that Libreoffice is looking for is openjdk-11. I imagine if you install that package that it should work.

        @ReillyBrogan I had 11 installed as well and tried both, 17 and 11, in the same way unsuccessfully.

        I followed @pomon 's advice and this worked instantly without issues. Thank you! 👍

        If I find some time I'll try to find what is wrong with OpenJDK version provided by Solus. The answer must be somewhere in LO's source.

        9 days later