Created
December 2, 2014 11:54
-
-
Save yarmand/c3e99bf78c22012714c4 to your computer and use it in GitHub Desktop.
chjava for OSX
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
JAVA_HOME_CMD=/usr/libexec/java_home | |
function chjava(){ | |
if [ $# -eq 0 ] ; then | |
$JAVA_HOME_CMD -V | |
return | |
fi | |
export JAVA_HOME=`$JAVA_HOME_CMD -v $*` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example usage: