Quick changing Java versions on MacOS Nov 6, 2018 • java,mac Share this to: Facebook LinkedIn Email These bash aliases help with Java development by making it easy to switch between Java JDK versions: alias JAVA8='export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"' alias JAVA9='export JAVA_HOME="$(/usr/libexec/java_home -v 9)"'