10 January 2017

easily switch between java versions on mac

add the following alias definitions to your rc (bashrc, zshrc or whatever)

alias  java8='JAVA_HOME=$(/usr/libexec/java_home -v1.8)'
alias java9='JAVA_HOME=$(/usr/libexec/java_home -v9)'


No comments: