Skip to content

Instantly share code, notes, and snippets.

@rherrick
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rherrick/f503874b7494a2850583 to your computer and use it in GitHub Desktop.
Save rherrick/f503874b7494a2850583 to your computer and use it in GitHub Desktop.
Switch between Java 7 and 8 in bash
alias setJava7="$(set | fgrep -i jdk | sed 's/1.8.0_25/1.7.0_71/g' | sed 's/^/export /')"
alias setJava8="$(set | fgrep -i jdk | sed 's/1.7.0_71/1.8.0_25/g' | sed 's/^/export /')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment