Post

Replies

Boosts

Views

Activity

Reply to /usr/libexec/java_home is completely broken on Big Sur
Try listing all VMs installed using the java_home utility (capital '-V' option): /usr/libexec/java_home -V Here's output on my system (as an example): Matching Java Virtual Machines (4): 		15.0.1 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 15" /Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Home 		11.0.9 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home 		11.0.8 (x86_64) "GraalVM Community" - "GraalVM CE 20.2.0" /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.2.0/Contents/Home 		1.8.0_275 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home /Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Home When selecting a specific version, you might want to enclose it into quotes, e.g.: /usr/libexec/java_home -v "11.0.8" /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.2.0/Contents/Home I did notice that if you have JAVA\_HOME already set, the "/usr/libexec/java_home -v 'VERSION'" does not return the path to the specified version but returns whatever is in JAVA\_HOME. So to remedy that, just unset JAVA\_HOME and then set it to whatever you want. unset JAVA_HOME export JAVA_HOME=$(/usr/libexec/java_home -v "11.0.8") This was not the case in the previous macOS version. I am running macOS Big Sur, Version 11.0.1
Nov ’20