Created
February 17, 2014 01:59
-
-
Save cadams500/9043392 to your computer and use it in GitHub Desktop.
Mac OS - Set JDK
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 jdkls='/usr/libexec/java_home -V 2>&1 | grep -E "\d.\d.\d_\d\d" | cut -d , -f 1 | colrm 1 4 | grep -v Home' | |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
function setjdk() { | |
export JAVA_HOME=$(/usr/libexec/java_home -v $1) | |
export PATH=$JAVA_HOME/bin:$PATH | |
java -version | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment