JRE install page locks up on MacOS

I was trying to connect a new JRE installation on a MacOS 12.1 M1 machine.
Using the LO (v7.2.5.2) preferences “options-LibreOffice-Advanced” window, trying to ‘add’ the JRE folder resulted in an error (no JRE file), and the window locked up. I could not navigate out and had to use “Force Quit” to get out.
the install was into the /Library/Java/JavaVirtualMachines/jdk-17.0.2.jre folder.

It should not have locked up after reporting the error message.

After several JRE install attempts, and several LO restarts, it now finds the “Oracle 17.0.2” but I’m not clear that it works (Zotero citation add still fail).

You will need JDK, not only JRE for MacOS: Java MacOS