-
-
Save feldoh/b54b95edec0c585f7f71 to your computer and use it in GitHub Desktop.
If you add functions like these to your .bash_profile then by simply typing the name of the function (in this case java7 or java8) into a terminal session, change the version of Java (or anything else) for just that session. This allows you to have whatever version of Java you need as default but freely switch for one time usage of tools like e.…
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
function java7 | |
{ | |
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home | |
export JAVA_HOME | |
} | |
function java8 | |
{ | |
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home | |
export JAVA_HOME | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment