I was using the old Java. Java for OS X 2015-001 - legacy Java SE 6 runtime.
I did this because newer Java's didn't work with my old modules - ones I wrote myself.
Now Mojave has overwritten this with Java 8 and won't let me install the old Java overwriting it.
Others may be having the same issues.
What solutions have you found? I am loathe to mess around with my new OS.
Thanks in advance.