mac os to set default version for java code example
Example: change default java version mac
nano ~/.zshrc
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0)
nano ~/.zshrc
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0)