commands.sh

java_home

macos

Return a value for `$JAVA_HOME` or execute command using this variable.

More info →

Examples (5)

List JVMs based on a specific version

java_home --version 1.5+

List JVMs based on a specific [arch]itecture

List JVMs based on a specific tasks (defaults to `CommandLine`)

java_home --datamodel Applets|WebStart|BundledApp|JNI|CommandLine

List JVMs in a XML format

java_home --xml

Display help

java_home --help
made by @shridhargupta | data from tldr-pages