LibreOffice and Java

Hello,
Recently found two updates to “Libreoffice portable”. One 6.3.4 version, the other 6.4.0. version
Currently I use 6.3.3 version.
In 6.4.0 version there is a “Java tree” of folders and files, so in the ‘tools > advanced’ is a window ‘Java options’, just clicked on the ‘add’, browsed to where the “Java tree” is and immediately it found the Java (Oracle 1.8.0).
Then I copied the whole “Java tree” into its place in 6.3.4 version, made the “add” as above, but it said something like “Could not find Java runtime…”.
What was/is wrong, or java does not fit to version 6.3.4.
Answers will be appreciated.
Thanks
Motim
OS is win 10 1809 x64 (17763.1012)

How to install Java (JRE/JDK) so that LibreOffice could use it?

Hello,
Thanks so much for the full detailed answer. I will give it a try later.
Thanks
Motim