I am very new to Mac Terminal and struggling to remove JAVA_HOME variable from ~/.zshrc. I am using MacOS 10.15.7.
I used the following to install and set Java:
% brew cask install liberica-jdk8-full
% export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
% echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)' | tee >> ~/.zshrc
I then uninstalled Java, but I keep getting the following when I open Terminal:
Unable to find any JVMs matching version "1.8".
No Java runtime present, try --request to install.
Unable to find any JVMs matching version "1.8".
No Java runtime present, try --request to install.
I tried to use "Unset JAVA_HOME" command but it doesn't seem to work. Any suggestions how I can remove this variable from the environment?
Thanks in advance.