This quick guide explains how you can fix the LibreOffice requires a Java runtime environment (JRE) error.
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.
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:
- How to check if LibreOffice detected Java Runtime Environment
- Fix for Windows
- Fix for Ubuntu and Other Derivatives
- Fix for Fedora
- Basic Troubleshooting
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.
- Open LibreOffice (calc, Impress, etc).
- Go to from Menu :
Tools -> Options -> AdvancedUnder LibreOffice.
- Under the Java Options window, you will see it listed if Java is installed. If not, there will not be any entries.
How to Fix JRE Error – LibreOffice
Fixing the JRE error in LibreOffice is different in Windows and Linux systems. Follow the steps below accordingly.
- Download Oracle Java Runtime Environment from the official link below and install it on 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.
- After successful installation, you should see below message.
- Now, it’s time to verify Java installation in Windows.
- By default, Java setup installs it in C:\Program Files\Java\jre1.8.0_231
- 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.
Linux, Ubuntu, RHEL, Fedora
Ubuntu, Linux Mint and other Ubuntu-based systems
- If you are running Ubuntu, open the terminal (CTRL+ALT+T) and run the below commands:
sudo apt install default-jre
sudo apt install libreoffice-java-common
For Fedora, run the 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.
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.
- If you cannot 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 typically installed 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 doesn’t work, then try restarting your system.
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.