Java_HOME not found when changed shell from Bash to Zsh on OSX?
问题 This is weird, I have set JAVA_HOME for my mac which can be found when I am using bash shell, but if I change shell, I get a message saying JAVA_HOME not set. What could be going on here? 回答1: When you set JAVA_HOME in a shell, then it is active and available only for that context, and it will be gone when you close that shell. Instead either change global environment (or) your .bashrc to include it. So that every time you start a shell, the variable will be available. edit the .profile or