Created
November 28, 2016 02:26
-
-
Save alexfernandez803/084b135446c875bca6279f8c14303c89 to your computer and use it in GitHub Desktop.
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
| Use jenv is an easy way. | |
| 1.Install jenv | |
| curl -s get.jenv.io | bash | |
| 2.Config jenv | |
| cd ~/.jenv/candidates/ | |
| mkdir java | |
| cd java | |
| mkdir 1.7 | |
| mkdir 1.8 | |
| 3.Symlink the jdk path | |
| ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin ~/.jenv/candidates/java/1.7 | |
| ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin ~/.jenv/candidates/java/1.8 | |
| 4.You are all set | |
| switch command: | |
| jenv use java 1.8 | |
| set default: | |
| jenv default java 1.7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment