change java version in terminal code example
Example 1: change default java version mac
nano ~/.zshrc
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0)
Example 2: changer version java terminal
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
nano ~/.zshrc
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0)
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`