What target is Add JAVA looking for?

I updated my Linux Ubuntu to 22.04 LTS and it comes with libreoffice. I installed the jdk 18, even the jre 18, but I am not sure how to get the libreoffice options advanced add to accept it. It keeps drilling down into subdirectories. Is there a magic folder name or file name to look for? java is in my path! /usr/lib/jvm/jdk-18/bin/java

Call menu:Help>About… and click the push button which copies the version info into the clipboard. Post the entire version info.
Java is not mandatory for 99% of LibreOffice. Even the Base component is usable without Java.

1 Like

Version: 7.3.5.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1
Calc: threaded

How to install Java (JRE/JDK) so that LibreOffice could use it? says nothing about Linux. I have configured java for libreoffice many times on many hosts, but apparently the target libreoffice is looking for is not registering any more! I go to the directory and hit ok and it just pops back up a file selector.

dgp@dgp-p6803w:~
$ java --version
java 18.0.2 2022-07-19
Java™ SE Runtime Environment (build 18.0.2+9-61)
Java HotSpot™ 64-Bit Server VM (build 18.0.2+9-61, mixed mode, sharing)
dgp@dgp-p6803w:~
$

is the latest version downloaded from libreoffice.org, right?
The deal with Ubuntu goes like this: Install the version of your current distribution and everything should be working fine. If you install any packages downloaded from somewhere, you are all on your own.

My understanding is that Ubuntu 22.04 distribution for LO and some other items now use Snap - avoid. Have noted several issues with this.
.
Current have TDF version installed on Ubuntu 22.04.1:
.
Version: 7.3.5.2 / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
.
No problems. Have java-14-openjdk-amd64 installed and in use (also used on Ubuntu 20.04).

snap list does not mention libreoffice.

Should I have to fall back to JAVA 14 from 18?

Used Synaptic Package Manager to retrieve v18 and no issue:

Screenshot at 2022-08-15 16-37-46

So if I install it as a jdk deb or via a jre zip then it is not visible to libreOffice? Synaptic says I have jdk 18. Synaptic does not show an oracle jre. You are using openjdk, I use Oracle jdk-18_linux-x64_bin.deb, jre is jre-8u341-linux-x64.tar.gz

Ubuntu 22.04 came with libreoffice as described above.

Here is Synaptic I have installed:


.
I stopped using (except for some testing on Mint 20) the distro versions of LO years ago. Too many issues for my liking.
.
Although some remnants, stopped using Oracle Java also. Not positive but believe I am using openjdk on Win 10 also.
.
Can only say that this is what has worked over a number of systems.

I tried installing openjdk 18 using Synaptics but same problem.

Have nothing further beside the my using the TDF version on Ubuntu 22.04.1 Mate and possibly something with your user profile. See User Profile

What’s a TDF? TDF - Wikipedia

I suspect libreOffice looks in a specific directory for specific names, and nobody has identified the directory or file name that satisfies it. Perhaps I need to visit a developers’ forum to get support?

TDF is The Document Foundation → LO Download
.
My comment above already shows the specific directory for openjdk 18:

/usr/lib/jvm/java-18-openjdk-amd64

Satan always mischief finds for idle fingers doing, so I ran sudo apt install libreoffice, and it went through the motions of a substantial install. Then I went to the Show Applications and nobody home. I went to search in Show Applications and it brought it up as software, a bit ambiguous so I clicked it and it ran Software, offered to Install, so I did and it did another substantial install, and now all 3 JAVA versions show up. Is this an Ubuntu bug or a TDF bug? Why does it install over again 3 times?
.
Does anyone care about fixing root cause?

Since yours is a distro version, it is probably an Ubuntu issue. Report there.
.
I’ve already stated my view on those releases.
.
Edited 2022-08-18:
.
Have now confirmed it is a distro issue.
Did clean install of Ubuntu 22.02 Mate. Had LO with no Base (typical in Distro releases). Installed Synaptic then OpenJDK-18 - Not showing in LO.
Updated Ubuntu 22.04 to 22.04.1 (after installing 5G wireless driver - download was over 500GB). Still no Java in LO.
Uninstalled distro LO & re-installed distro LO. No Java.
Uninstalled distro LO & installed TDF LO. Java showed immediately.
.
Distro issue.