/usr/libexec/java_home is broken in Monterey 12.1

/usr/libexec/java_home -V displays the three JDK's on my system...

Matching Java Virtual Machines (3):

    17.0.1 (arm64) "Azul Systems, Inc." - "Zulu 17.30.15" /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home

    17 (arm64) "Oracle Corporation" - "Java SE 17" /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home

    16.0.2 (arm64) "Azul Systems, Inc." - "Zulu 16.32.15" /Library/Java/JavaVirtualMachines/zulu-16.jdk/Contents/Home

With /usr/libexec/java_home -v "16" , it returns Zulu 16.32.15. I can pass 16 or 16.0.2 to -v and they both return the same JDK path.

With /usr/libexec/java_home -v "17", it ALWAYS returns Zulu 17.30.15. I cannot find a way to get java_home to return the JDK path for Oracle Java SE 17.

Is this is bug? /usr/libexec/java_home seems to only handle MAJOR version of JDK/JRE. Or does everyone but me have multiple JDK's with distinct major versions (lol)?

Just you, but you will have better traction on this topic on their respective support forums. https://github.com/zulu-openjdk

/usr/libexec/java_home is broken in Monterey 12.1
 
 
Q