LibreOffice does not find Java

I have a strange problem with Java in LibreOffice on Lubuntu 1604.
If I install the default LibreOffice version

sudo add-apt-repository ppa:libreoffice/ppa;
sudo apt update;
sudo apt install libreoffice

it automatically installs Java and in Options - Advanced - Use a java runtime environment it shows: Vendor = Private Build, Version 1.8.0_232, located at /usr/lib/jvm/java-8-openjdk-i386/jre


However I want to use Firebird on LibreOffice and have been unable to get it to install with the latest LibreOffice. So I thought I would download an older version, and try that. I downloaded the tar.gz and installed it, but no Java was included. Being as the Java in reality had been installed by LibreOffice, I was able to specify where the environment was, only to be informed by LibreOffice that there was no Java in that location! Note that if I ran the other LibreOffice simultaneously, the other version found it straightaway.

I have tried various combinations of this, including removing all copies of LibreOffice and just installing, and separately installing Java using:
sudo apt install default-jre;
sudo apt install libreoffice-java-common;

LibreOffice never finds a Java environment, even though there is one.
What am I missing?

(by the way, if any of you know of a LibreOffice version for Lubuntu 1604 that has Firebird already installed and working, that would also be very helpful (especially if it works with Java!).


You are not clear about which Firebird - embedded or Server. Embedded has been included with LO (64-bit versions I have used) for sometime & is a dropdown selection when creating a Base file (choice of HSQLDB or Firebird).

Also note, Firebird embedded does not require the installation of Java. However, if you want wizards or Report Builder operational then Java is needed.

Hi Ratslinger, I mean Firebird embedded, and it is not included in the latest 32-bit version for Lubuntu (LibreOffice Only HSQLDB appears in the dropdown menu, and then needs to be separately installed (sudo apt install libreoffice libreoffice libreoffice-sdbc-hsqldb). when trying then to add Firebird, an installation error is given: “libreoffice-sdbc-firebird : Depends: libreoffice-core (= 1:5.1.6~rc2-0ubuntu1~xenial10) but 1:6.2.8~rc2-0ubuntu0.16.04.1 is to be installed. E: Unable to correct problems, you have held broken packages”.

Looking on the forums, it seems that the latest versions of LibreOffice for Lubuntu do not work with Firebird embedded. Pity, as I had been advised to use Firebird when starting this adventure.

So I decided to backtrack and try to find a LibreOffice version that did work with Firebird embedded. That was when I ran into the Java problem.

My Lubuntu 1604 system is 32 bits, the LibreOffice version is 32-bits, and the JRE is 32bits.

What is missing is why the LibreOffice installation did not find the installed JRE.

Physically the files appear to be there. From the terminal, asking: java -version, it says:

openjdk version “1.8.0_232”

OpenJDK Runtime Environment (build 1.8.0_232-8u232-b09-0ubuntu1~16.04.1-b09)

OpenJDK Server VM (build 25.232-b09, mixed mode)

So it is a mystery to me why LibreOffice does not find the Java installation?

Any help you can provide would be welcome!


at /usr/lib/jvm/java-8-openjdk-i386/jre

This (i386) means you intalled 32-bit Java. Thus you need either:

  • Install LibreOffice 32-bit (if you want use 32-bit Java) –or
  • Install Java 64-bit (if you want use 64-bit LibreOffice)

See also:

  1. FAQ - How to install Java (JRE/JDK)
  2. FAQ - Install correct Java


but no Java was included

LibreOffice does not deliver Java. It’s up to you (or your operating system) to provide Java.

Hope that helps.

If the answer helped you to solve your problem, please click the check mark (:heavy_check_mark:) next to the answer.

HI Opaque, thanks for answering. My Lubuntu 1604 system is 32 bits, the LibreOffice version is 32-bits, and the JRE is 32bits. What is missing is why the LibreOffice installation did not find the installed JRE. Asking Lubuntu what version of Java is installed, it happily replies: 1.8.0_23 So how come LibreOffice can’t find it, or when I physically tell it where it is located, it keeps saying that there is no JRE!

Thanks - but you didn’t mention these important facts in your original question. If - I wouldn’t have answered


With “Lubuntu 1604 system is 32 bits” you may find this answer by @rbscebu to work → How do I get Base to work under Lubuntu 16.04?. Seem to recall testing this and with Ubuntu (or similar) and it fixed the problem. Appears to be Kernel related - see additional link in answer.

I tried the grub workaround but nothing changes. In summary, I can install the JRE and get Lubuntu to recognise it and report that it is installed and which version. But then LibreOffice first does not automatically find the JRE environment, and second when I point it to the right files, it still says that there is no JRE environment.

I finally got the JRE to be recognised by downloading a JRE version from Oracle, installing it in a specific directory /opt/jre, and then making it the default choice of Java (sudo update-alternatives --install /usr/bin/java java /opt/jre/jre1.8.0_231/bin/java 100). This allowed LibreOffice to find it. After that, I also had to make the change to the boot grub as mentioned above (GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash stack_guard_gap=1”) to stop Libreoffice crashing every time I tried to do anything. Thanks to all of you for pointing me in the right direction

I managed to get LibreOffice to “find” Java by forcing the Java installation as the default.

' to install jre from Oracle
' download from Oracle site jre-8u231-linux-i586.tar.gz
' make directory where to install
sudo mkdir /opt/jre
' unpack the jre package
sudo tar -xvzf jre-8u231-linux-i586.tar.gz -C /opt/jre
' force latest version as the default java installation
sudo update-alternatives --install /usr/bin/java java /opt/jre/jre1.8.0_231/bin/java 100
' check that default has been set
sudo update-alternatives --display java

By doing this before installing LIbreOffice, it found the Java installation.