Libreoffice 6.3.6.2 needs Java?

I’m trying to set up a database in LibreOffice 6.3.6.2, yet this needs a newer version of Java. I’m running MacOs High Sierra 10.13.6.
When I try to use Libreoffice, despite installing Java, i get a “Java not installed” message. So which version of Java should I install, please? A link to the correct site would be helpful too.
Thanks in advance.

can this help?

https://wiki.documentfoundation.org/Faq/General/InstallJava

On macOS you need to install JDK (not JRE)