Thanks both for your answers. Using the dmg file seems to have fixed part of the problem.
I previously downloaded jdk from this page: http://jdk.java.net (the Ready for Use version), then chose the mac version. That downloaded a tar.gz file, which gave me the jdk folder i mentioned.
Instead i went to the downloads area you both suggested, and chose the dmg version. On opening it i was greeted with an installation guide, which i followed, and was told the installation was successful.
However then i tried to open a table i’d created a week or two ago, and got the message, “The connection to the external data source could not be established. No SDBC driver was found for the URL ‘sdbc:embedded:hsqldb’.”
Is this a related problem or another problem?