Java VMs should be installed in either
~/Library/Java/JavaVirtualMachines. Not sure where JREs go, but really, who cares?
java_home tool is extremely useful, but is not located in the path 🙁 (
java_homeshows the default JVM.
java_home -Vlists all installed JVMs.
java_home -v 11lists all installed Java 11 JVMs.
java_home --exec <command>runs <command> with the default JVM (use
-vfor a specific version — if there is more than one, it uses the first returned).