LibreOffice does not recognize Java JDK on Mac (M4 chip)

LibreOffice Base shows an error message that it cannot connect to a data source. The message says, "No SDBC driver was found for the URL ‘sdbc: embedded:hsqldb’. LibreOffice > Preferences > Advanced does not list any JDK files and the Add button is grayed out. The only button that works is the Open Expert Configuration button. LibreOffice 25.2.5.2 is on a Mac with Apple M4 chip and Sequoia 15.6.

Recurring problem…
.
First step: You have JDK and LibreOffice for ARM/M4? Both have to match.

PS: I changed your tags, as this problem is not a problem of Base (even when it is often a problem while using Base).