Unable to open saved files with LO Base 5.

I have upgraded to LO version 5 and try to open database files created in LO Base version 4 but get the message that the program can’t find Java. I have both the 32 and 64 bit Java versions installed and tried them both. They show up with the right addresses in “Tools / Options / Advanced” . When I use version 4 I have no problems. What can I do to make version 5 work?