I have a strange problem with Java in LibreOffice on Lubuntu 1604.
If I install the default LibreOffice version 22.214.171.124:
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, 126.96.36.199 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 188.8.131.52, I was able to specify where the environment was, only to be informed by LibreOffice 184.108.40.206 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 220.127.116.11, and separately installing Java using:
sudo apt install default-jre;
sudo apt install libreoffice-java-common;
LibreOffice 18.104.22.168 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!).