How to Fix: LibreOffice requires a Java runtime environment Error

This quick guide explains how you can fix the LibreOffice requires a Java runtime environment (JRE) error.

LibreOffice – the free office suite requires Java runtime environment for some of its own functionalities. For example, some of the plugins, extensions, Python macros require Java Runtime Environment (JRE) to work.

Lack of JRE, would cause the below error in LibreOffice:

LibreOffice requires a Java runtime environment (JRE) to perform this task. Please install a JRE (and libreoffice-java-common) and restart LibreOffice.

JRE Required Error
JRE Required Error

This happens when JRE is not installed in your OS – be it either Windows or Linux. Before you go ahead and try to fix via installing JRE, first you have to check whether Java Runtime Environment is installed in your system or not.

How to check if LibreOffice detected Java Runtime Environment

Before you install Java Runtime Environment to fix the issue, follow the below steps to check whether Java is installed and LibreOffice is able to detect it.

  • Open LibreOffice (calc, Impress, etc).
  • Go to from Menu : Tools -> Options -> Advanced under LibreOffice.
  • Under Java Options window, if Java is installed you would see it listed. If not, there will not be any entries.
LibreOffice Options Dialog - Before JRE Installation
LibreOffice Options Dialog – Before JRE Installation

How to Fix JRE Error – LibreOffice

Fixing JRE error in LibreOffice is different in Windows and Linux systems. Follow the steps below accordingly.

Windows

  • Download Oracle Java Runtime Environment from below the official link and install it in Windows. This link will take you to manual installation for Windows 10 with an offline installer.
  • Select “Windows Offline (64-bit)”.
  • After downloading, click on jre-***.-windows-x64.exe to install. It should open up a window like below. Do not change the destination folder. Click Install.
Java Setup in Windows
Java Setup in Windows
  • After successful installation, you should see below below message.
Java Setup Complete
Java Setup Complete
  • Now, its time to verify Java installation in Windows.
  • By default Java setup installs it in C:\Program Files\Java\jre1.8.0_231
SEE ALSO:  How to Delete Empty Rows in LibreOffice Calc Sheet
Java Installation Directory in Windows 10
Java Installation Directory in Windows 10
  • Close all the LibreOffice instances.
  • Restart LibreOffice and perform the task which gave you the error. You should not be receiving the error anymore.
  • Verify from Tools -> Options -> Advanced that LibreOffice detected the Java runtime correctly.
Java is detected by LibreOffice in Windows 10
Java is detected by LibreOffice in Windows 10

Linux, Ubuntu, RHEL, Fedora

Ubuntu, Linux Mint and other Ubuntu based systems

  • If you are running Ubuntu, open terminal (CTRL+ALT+T) and run below commands:
sudo apt install default-jre
sudo apt install libreoffice-java-common

Fedora

For Fedora, run below commands

sudo dnf install default-jre libreoffice-java-common 
  • Once the installation is finished, close all instances of LibreOffice.
  • Restart LibreOffice and perform the task which you were doing causing the error.
  • You should not be receiving any more errors.

For other Linux distributions, download the related package (RPM, etc) from the above official Oracle download page.

If you have successfully installed the Java Runtime Environment, then go to Tools -> Options -> Advanced again and you can see Java is listed (see below). Select the JRE and press OK.

LibreOffice Options Dialog - After JRE Installation

Troubleshooting

  • If you are unable to find Java Runtime Environment after installing JRE, click on the Add button and browse-select the directory where Java is installed.
  • For Windows 10, Java is installed typically in C:\Program Files\Java\jdk-***. OR C:\Program Files (x86)\Java\jre**** Select the jdk/jre folder and click Ok.
  • After successful installation, always close all LibreOffice instances and check whether Java is detected.
  • If that still doesnt work, then try restarting your system.

Conclusion

The above steps should solve the JRE error for LibreOffice. If you are still facing the error, drop a comment below with LibreOffice version, OS version.

  • Don’t forget to let us know if this solves the problem for the benefit of others.

Looking for something else?

Read our complete tutorial index of Calc, Writer, Impress and Draw.


Join our Telegram channel and stay informed on the move.

Related


arindam

IT professional by profession and founder of libreofficehelp.com. Loving Linux and other technologies since 2002. I believe in open source and its philosophy. Follow me on Twitter or email me.

27 thoughts to “How to Fix: LibreOffice requires a Java runtime environment Error”

  1. I have the same issue as Steve and CClam21. JRE installed, but LibreOffice doesn’t see it installed. And I also don’t see any JDK folders installed, although Java tells me I’ve installed in correctly. Please help!

  2. LibreOffice tells me that it requires a JRE and that I do not have one. I have installed Oracle Java 8 and rebooted my computer. The Configure Java application tells me that Java is installed and gives me the path. LibreOffice still does not find the JRE. In Tools->Options->Advanced there is not JRE indicated. I have tried to Add the JRE, but navigating to the path indicated by Configure Java results in LibreOffice telling me there is no JRE.
    Steve [email protected]

    1. I’m seeing the same problem.

      Windows 10 Pro Version 1809 Build 17763.615
      New install of JRE 1.8.0_221 (64 bit)
      LO Version: 6.1.6.3 (x64)

      Reboot of the computer after installing java jre did not help.

      I was not sure exactly which folder should be selected in LO Java options as the java location. My guess was the folder containing java.exe. But I tried both of these:
      C:Program Files (x86)Javajre1.8.0_221
      C:Program Files (x86)Javajre1.8.0_221bin (where java.exe is located)

      In both cases I get the LO error message saying the selected folder does not contain a Java runtime environment.

      1. I finally figured it out. For some reason Oracle downloaded the 32-bit version of java to my system instead of the 64-bit version. (even though I’m running 64-bit Firefox on 64-bit Windows!). I went to the java manual download page and chose the 64-bit windows JRE download, installed it, and was then able to select and use it successfully in LO Base.

        Java (JRE) manual download page:
        https://www.java.com/en/download/manual.jsp

  3. It helped me:
    Tools-Options-LibreOffice-Advanced – push buton Add…
    (even if repeatedly – though you see this setup )
    insert path to your installed Java runtime – example:
    /usr/lib/jvm/java-8-openjdk-i386/jre

    1. Vlastimil, thank you. That fixed it for me.

      Of course, I had to sub ’14’ for ‘8’ in your example path, since I downloaded Java v14. Then I had to follow the path inside the Library Java folder to find the right end point. t was trial-and-error, but in the end it worked.

      This is too much for a regular user. LibreOffice has to fix this.

  4. I’m running Linux Mint 19 and LO 6.2.3.2. I’ve done the Linux instructions above and I still see nothing listed for the JRE already installed.

    1. First check whether Java is properly installed. Check the “java –version” by running it from terminal. If it shows version then, check the “echo JAVA_HOME”

  5. Same, running U18.04. Everything installed but LO refuses to either acknowledge jre or to be pointed to one.

    1. First check whether Java is properly installed. Check the “java –version” by running it from terminal. If it shows version then, check the “echo JAVA_HOME” by running it from terminal.

      1. Thanks, went to a new machine and started from scratch. Did apt install default-jre per instructions above and now everything fine. Just have to figure out why it’s not working on first machine.

        1. Which LO version are you running? I was running 5.4 on Linux Mint. I followed the instructions from the letter, even went as far as uninstalling and resistalling LO via apt to no avail.

          I ended up going to the LO website, downloading LO 6.4 and it detected Java at /usr/lib/jvm/java-14-oracle/bin/java. And everything is fine now. By everything I mean that the Zotero toolbar is functional.

          With this success, I hopped over to LO 5.4 which I still had installed and it just wouldn’t detect the Java that it’s sibling had seen. I uninstalled.

          Thanks a lot Arindam Giri for the lucid article.

          1. UPDATE:
            I was on Mint 18, I just did a clean install of Mint 19.3 Tricia and voila LO 6.0.7.3 comes with Open JDK installed.

            Thank you so much.

  6. I’m running LibreOffice 6.4 on MacOS Mojave, trying to open a database I created last year. I got the Java runtime error. I went to Oracle & downloaded v 14 of Java, went to LO Prefs>Advanced & selected the new Java version. I went back to my database & got the same error.

    What now?

  7. For all those people running Windows 10, whose error still persists, please download and install the “offline” version of JRE as mentioned in the article. After countless tries, installing the “offline” JRE version worked for me. Thanks to Arindam for the article.

  8. Simple cure for Libre Office not seeing JRE.
    I had both Open Office and Libre Office added later.
    Neither could see any JRE JDK via Options/Advanced
    Suspected corruption from several uninstall operations.
    Uninstall, download latest versions of each Install anew
    Bingo both saw Java and installed easily under Options/Advanced.

  9. This does not solve the problem: I deactivated “Use a Java runtime environment” under “Java Options” but still get the error message. Installing Java is not a solution; there are good reasons not to do so Libre Office uses Java only for a few function, that’t why there is the option not to use it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.