0

I have macOS Big Sur (11.0.1) installed and I wonder why the /usr/libexec/java_home command does not print out anything at all in zsh. Only using the -h option prints out the help but any other option -V, -X, ...does not print out anything. Why?

Maybe it's worth to be noticed: I installed JENV and doctor says:

% jenv doctor
[OK]    JAVA_HOME variable probably set by jenv PROMPT
[OK]    Java binaries in path are jenv shims
[OK]    Jenv is correctly loaded

echo $JAVA_HOME says:

~HOME/.jenv/versions/system

This command prints out nothing:

xxx ~ % /usr/libexec/java_home -V
xxx ~ % 

Installed JDKs:

xxx ~ % jenv versions
* system (set by /Users/du-it/.jenv/version)
  11
  11.0
  11.0.2
  15
  openjdk64-11.0.2
  openjdk64-15
du-it
  • 2,561
  • 8
  • 42
  • 80

1 Answers1

0

The instructions of how to install jEnv are not completely comprehensive, I think. I have to find out with Manage your Java JDKs

that it seems to be essential to run this command:

jenv global 11.0.2.

Now the java_home command prints out a valuable result.

du-it
  • 2,561
  • 8
  • 42
  • 80