Site icon libreofficehelp.com

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 in Windows, Linux and macOS.

LibreOffice – the free office suite requires a Java runtime environment for some of its functionalities. For example, some plugins, extensions, and 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 (Figure 1)

This happens when JRE is not installed in your OS – either Windows or Linux. So, in this guide, we will fix it or try to fix it.

This guide covers the following topics:

Before you go ahead and try to fix via installing JRE, firstly, 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 can detect it.

LibreOffice Options Dialog – Before JRE Installation (Figure 2)

How to Fix JRE Error – LibreOffice

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

Windows

Java Setup in Windows (Figure 3)
Java Setup Complete (Figure 4)
Java Installation Directory in Windows 10 (Figure 5)
Java is detected by LibreOffice in Windows 10 (Figure 6)

Linux, Ubuntu, RHEL, Fedora

Ubuntu, Linux Mint and other Ubuntu-based systems

sudo apt install default-jre
sudo apt install libreoffice-java-common

Fedora

For Fedora, run the below commands

sudo dnf install default-jre libreoffice-java-common 

Download the related package (RPM, etc.) for other Linux distributions from the 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 (Figure 7)

macOS

JDK installer for macOS (Figure 8)
Open the dmg file from Finder (Figure 9)
Complete the JDK installation in macOS (Figure 10)
JRE is detected in LibreOffice on macOS (Figure 11)

Troubleshooting

Conclusion

The above steps should solve the JRE error for LibreOffice. If you still face the error, drop a comment below with the LibreOffice and OS versions.

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

Exit mobile version