Post

Replies

Boosts

Views

Activity

Big Sur doesn't track JAVA_HOME when running commands from the JDK
Previous versions of macOS use the current value of the JAVA\_HOME environment variable to launch the appropriate version of any commands from the JDK bin folder. This was presumably handled by some magic in the JDK commands that are installed in /usr/bin. On Big Sur beta 7 I am no longer seeing this behaviour. I always get the latest installed version of the JDK command regardless of what I set JAVA\_HOME to. I usually run a script to set JAVA\_HOME based on the output of /usr/libexec/java\_home -v ??? (where ??? is related with the JDK version). The java\_home command is working as expected and I am sure that the JAVA\_HOME environment variable is correctly set. I've submitted a report with Feedback Assistant, but I wonder if others can confirm this is a reproducible problem. Is there a workaround?
1
0
3.5k
Sep ’20
/usr/libexec/java_home is completely broken on Big Sur
Is /usr/libexec/java\_home working on Big Sur for anyone? It won't output anything unless the JAVA\_HOME environment variable is already set. When querying for the home folder for a specific version of the JDK, it always just returns the current value of the JAVA\_HOME environment variable. Since the only useful purpose of the java\_home tool is to get a value for setting JAVA\_HOME, this is somewhat backwards and useless. I reported this against Big Sur betas but that didn't get anywhere. In one case I was actually told it was working as designed, which is clearly not the case.
17
0
22k
Nov ’20