java_home
Return a value for $JAVA_HOME or execute command using this variable. tldr-pages
On macOS
macOS
List JVMs based on a specific version
java_home --version 1.5+IdentifyList JVMs based on a specific [arch]itecture
java_home --arch i386IdentifyList JVMs based on a specific tasks (defaults to CommandLine)
java_home --datamodel AppletsIdentifyList JVMs in an XML format
java_home --xmlIdentifyDisplay help
java_home --helpIdentify