Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Change your JAVA_HOME
function setjdk() {
if [ $# -ne 0 ];
then export JAVA_HOME=`/usr/libexec/java_home -v $@`;
fi;
java -version;
}
# Automatically set the JAVA_HOME
setjdk 1.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment