From macOS Catalina the default shell has changed from bash to zsh.
I had bash installed separately with Homebrew, so even if I updated the OS, it didn't change from bash.
However, I thought that the thing was a trial, so I changed it to zsh manually.
However, when I use Maven, I am told that there is no Java.
Error message
$ mvn clean package
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
No Java runtime present, requesting install.
The dialog also says "You need to have the JDK installed to use the" java "command line tools."
I installed the JDK using SDKMAN when I was using bash. I was able to use it without problems when I was in bash.
When SDKMAN was installed during bash, the following description was added at the end of ~ / .bash_profile.
~/.bash_profile
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/Users/username/.sdkman"
[[ -s "/Users/username/.sdkman/bin/sdkman-init.sh" ]] && source "/Users/username/.sdkman/bin/sdkman-init.sh"
Replace
username
with your username
Copying this description and adding it to the end of ~ / .zshrc fixed the problem!
Recommended Posts