Last active
August 29, 2015 14:07
-
-
Save dgershman/800f0de16aa10fd7595a to your computer and use it in GitHub Desktop.
bash_profile alias for swapping between java6 and java7
This file contains hidden or 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
#functions | |
function func_java6() { | |
export JAVA_HOME=$JAVA6_HOME | |
echo $JAVA_HOME | |
} | |
function func_java7() { | |
export JAVA_HOME=$JAVA7_HOME | |
echo $JAVA_HOME | |
} | |
#aliases | |
alias java6=func_java6 | |
alias java7=func_java7 | |
#vars | |
export JAVA6_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home | |
export JAVA7_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home | |
export JAVA_HOME=$JAVA6_HOME |
I'm defaulting to java6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just replace your paths for
JAVA6_HOME
andJAVA7_HOME