From The Document Foundation Wiki
- Wiki Home
- Development
- Design
- QA
- Events
- Documentation
- Website
- Localization
- Accessibility
- Marketing
- Diversity
- Wiki Help
Install the correct JRE — LibreOffice on windows 10 / 11
This description refers to LibreOffice and a possibly required Java JRE on Windows.
Why Java Runtime Environment (JRE)
LibreOffice Base, see also
Documentation,
uses the HSQL database, this requires Java Runtime Environment (JRE)
.
It explains how to install the right Java Runtime Environment (JRE) on Windows 10 and 11 and how to integrate it into LibreOffice.
Which version JRE
If you use LibreOffice in the 32-bit version, you must also install the JRE 32-bit version.
If you use LibreOffice in the 64-bit version, you must also install the JRE 64-bit version.
Regardless, you can also install the JRE 32-bit and 64-bit versions in parallel.
JRE – Download
goto FAQ — How to install Java (JRE/JDK) so that LibreOffice could use it?
Important Oracle Java License Update
The Oracle Java License has changed for releases starting April 16, 2019. In short, commercial use in no longer free. See details on Oracle website.
JRE register in LibreOffice
To register the JRE in LibreOffice, open LibreOffice.
From the menu ▸ ▸ ▸ . (with the ribbon bars activated, you may need to un-hide the menu with the «show menu» icon, on the top left)
In the «Options LibreOffice Advanced» dialog, under «Java Options», check the box «Use a Java Runtime Environment».
If there is no entry here, go to Add…, select the JRE in the popup window, and OK.
FAQ — How to install Java (JRE/JDK) so that LibreOffice could use it?
See also other operating systems.
FAQ — How to install Java (JRE/JDK) so that LibreOffice could use it?
Further informations
Documentation / Manuals
Here you will find the Documentation / Manuals:
Documentation / Manuals
Any questions?
For questions on this topic go to:
Ask.LibreOffice
Get Involved
Join us today and help us to make it even better!
Get Involved
Donate
LibreOffice is Free Software and is made available free of charge.
Your donation, which is purely optional, supports our worldwide community.
If you like the software, please consider a Donation.
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.
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).
- For Windows, Linux – go to from Menu :
Tools -> Options -> Advanced
Under LibreOffice. - For macOS click
LibreOffice > Preferences
from main menu. - Under the Java Options window, you will see it listed if Java is installed. If not, there will not be any entries.
Fixing the JRE error in LibreOffice is different in Windows and Linux systems. Follow the steps below accordingly.
Windows
- 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
Fedora
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.
macOS
- For macOS, you need JDK from a different location from Oracle. The standard JRE installer from the above won’t work.
- Go to the below link and download the dmg file. See Figure 8.
- Download Java for macOS
- Open Finder and go to Downloads folder. Double-click on the dmg file. See Figure 9.
- In the setup window, follow the on-screen instructions to install JDK. See Figure 10.
- The Java installation path is at
/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home
for macOS JDK 21. You can use “Go to” from Finder menu to go to the folder. - Open LibreOffice, and go to
LibreOffice > Preferences > Advanced
. And you can see the Java is detected as shown in below. See Figure 11. - Note: If it is not detected for macOS, you can use Finder “Go to” to the above path. Then add a shortcut from File > Add to sidebar. Then open LibreOffice > Preferences > Advanced and click Add to choose the said path for manual detection.
Troubleshooting
- 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.
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.
Установка пакетов
Если комплект пакетов LibreOffice не был установлен при инсталляции системы, то установить его:
sudo apt install libreoffice libreoffice-l10n-ru
Начиная с оперативного обновления 7 Astra Linux Special Edition РУСБ.10015-01 (очередное обновление 1.6) БЮЛЛЕТЕНЬ № 20210611SE16 актуальная версия пакета libreoffice-sdbc-hsqldb находится на диске с обновлением. Для более ранних оперативных обновлений пакет libreoffice-sdbc-hsqldb находится на диске со средствами разработки, и в этом случае требуется установить пакет отдельно после подключения репозитория со средствами разработки:
sudo apt install libreoffice-sdbc-hsqldb
Установка Java Runtime Environment
Axiom JDK Pro
- Загрузить пакет по ссылке https://axiomjdk.ru/pages/downloads/.
- Установить загруженный пакет в соответствии с инструкциями производителя.
Оригинальная версия Oracle Java
JRE доступен для скачивания на официальном сайте, для этого нужно перейти на java.com и нажать кнопку «Загрузить Java бесплатно», после чего внизу страницы выбрать версию для «Linux x64» (не «Linux x64 RPM») и скачать архив:
Распаковать скачанный архив, выполнив команду:
sudo tar -C /opt -xzvf Загрузки/jre-*-linux-x64.tar.gz
Запустить libreoffice-base и в системе меню выбрать «Сервис» — «Параметры»:
Далее «Расширенные возможности» — «Добавить»
После чего по аналогии с предыдущим пунктом выбирать путь /opt/jre1.8.0_211, нажать «ОК», и подтвердить согласие на перезапуск.
Итог
LibreOffice Base работает:
;
Date: Wed Aug 24 2016
Tags:
Databases »»»» MySQL »»»» JDBC »»»» LibreOffice
I wanted to try using LibreOffice Base on Mac OS X to play with a MySQL database. I thought it would be easy, just connect to the database and start doing queries, maybe even pull data into a LibreOffice spreadsheet for advanced data munging. But doing the obvious thing got me messages like «No Java Installation found» and «the driver class com.mysql.jdbc.Driver could not be found». Further, yahoogling with some obvious search phrases turned up nothing. Finally, going to LibreOffice.org and looking at the official LibreOffice Base documentation showed no instructions on setting up JDBC MySQL with LibreOffice.
LibreOffice Base is supposed to be an excellent thingymajob for doing database whatever. I don’t know, I’ve never used it. I’m looking forward to using it in the LibreOffice Spreadsheet tool instead.
This was very frustrating, but it turns out to be easily fixed.
Install Java JDK for your operating system
Java does come pre-installed on Mac OS X but it’s just a JRE. Turns out that LibreOffice requires a JDK (Java Development Kit) to be installed, rather than a JRE (Java Runtime Environment). I don’t grok why that would be the case, but I found multiple sources saying the same thing. I looked at some issues in the issue queue, and it seems there’s some fugly history between Apple’s Java and Oracle’s and … uh … that’s not important because we just install Oracle’s Java and get on with things.
The first step is to go to
oracle.com technetwork java javase downloads index.html for the official Oracle Java download page. What you want is the JDK, so click on the JDK Download button, then on the next page select the download archive matching your operating system. Make sure to agree to the license.
This gives you a JDK installer, for your operating system, that you run to install the JDK on your system.
Get the MySQL JDBC driver
You don’t install the JDBC driver so much as unpack it on your system, somewhere.
Go here:
dev.mysql.com downloads connector j
Then download the archive they provide, and unpack it somewhere on your computer. It doesn’t matter where.
Install LibreOffice and MySQL
You already have this installed somehow, I’m assuming. Right?
I install LibreOffice using the installer from
http://libreoffice.org
I install MySQL using MacPorts.
LibreOffice Java Preferences
This took awhile to find but it turned out to be the critical piece.
For the Mac OS X LibreOffice, you open Preferences and navigate as shown below. For other OS’s, it appears you use the Tools menu to get to the Preferences doohickeythingamajob.
Once you have the JDK installed, some choices appear here. Tick the «Use a Java runtime environment» then tick the radio button in the box below. You’ll need to restart LibreOffice at this point for the change to take effect.
Once I’d done this the error message while setting up a MySQL JDBC database changed from «No Java installation found» to «the driver class com.mysql.jdbc.Driver could not be found». This will be your clue that you’re on the right path.
Adding MySQL JDBC driver to LibreOffice
Again, you don’t «install» the JDBC driver so much as unpack it somewhere on your system. The trick is to get the driver onto the Classpath of LibreOffice. It doesn’t work to simply set your login CLASSPATH
variable. Of course not, this is Java and nothing is easy.
You’ll notice there’s a Classpath button in the window. Click on that.
What you do is click the Add Archive button, and add the mysql-connector-java .jar
file you downloaded above. You’ll again need to restart LibreOffice.
Setting up MySQL JDBC database in LibreOffice Base
Now we can do the thing we set out to do, setup a MySQL database in LibreOffice Base.
Select MySQL as the type of database.
We’ll be connecting with JDBC.
If all goes well, you’ll get this message with the Test Class button.
Enter the «Database name» and «Server» in the boxes above.
Next step is verifying you can access the database. Enter the login name and password credentials, and click Test Connection, and if all went well you’ll get the above message.
This last step finalizes the database in LibreOffice.
After this you’ll be in LibreOffice Base and can do database things there. I don’t know enough to recommend anything you can do. I did try a query, and it came up quickly in a nice table.
About the Author(s)
David Herron
:
David Herron is a writer and software engineer focusing on the wise use of technology. He is especially interested in clean energy technologies like solar power, wind power, and electric cars. David worked for nearly 30 years in Silicon Valley on software ranging from electronic mail systems, to video streaming, to the Java programming language, and has published several books on Node.js programming and electric vehicles.
Loading