Created
July 31, 2015 16:15
-
-
Save Amelia-Lopez/242ee2b9679208e1539f to your computer and use it in GitHub Desktop.
Setting up Java path in OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias whichjava="/usr/libexec/java_home -V" | |
export JAVA_VER=1.8.0_45 # how you would default to Java 8 | |
export JAVA_VER=1.7.0_79 # actually set default to Java 7 | |
export JAVA_HOME=$(/usr/libexec/java_home -v $JAVA_VER) | |
export PATH=$JAVA_HOME/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment