If you, like me, need to install Java 8 on your MacOS, then this is the TL;DR:
brew install openjdk@8
You will find more complete instructions in mykong's excellent overview of How to Install Java on Mac OS X.
I needed Java8 in order to play with MorganaXProc-III, a Java XProc 3 implementation. At the time of writing, that software only supports Java 8, which set me hunting for how to install Java 8 on my Mac.
Hopefully, this short note will also help you (or future me).