Skip to main content

List installed JVMs on macOS

You can list all installed JVMs by running:

/usr/libexec/java_home --verbose

The output looks like this:

Matching Java Virtual Machines (3):
    21.0.3 (arm64) "Microsoft" - "OpenJDK 21.0.3" /Library/Java/JavaVirtualMachines/microsoft-21.jdk/Contents/Home
    17.0.11 (arm64) "Microsoft" - "OpenJDK 17.0.11" /Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home
    11.0.23 (arm64) "Microsoft" - "OpenJDK 11.0.23" /Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/microsoft-21.jdk/Contents/Home

Created