Last active
September 1, 2016 04:24
-
-
Save newhavengill/9301072 to your computer and use it in GitHub Desktop.
Add jdk8 and toggle between jdk7 and jdk8
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
## I'm running Mavericks. No Java and no Maven anymore | |
## Download jdk8 --> https://jdk8.java.net/download.html | |
## then add the following to your ~/.profile and source | |
export JAVA_7_HOME=$(/usr/libexec/java_home -v1.7) | |
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8) | |
export JAVA_HOME=$JAVA_7_HOME | |
## Command line alias so we can switch to java6 or Java7 | |
alias java7='export JAVA_HOME=$JAVA_7_HOME' | |
alias java8='export JAVA_HOME=$JAVA_8_HOME' | |
## If you haven't already, installed maven | |
## brew update | |
## brew install maven | |
## mvn -version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment