alias setjdk16='export JAVA_HOME=$(/usr/libexec/java_home -v 1.6*)' alias setjdk17='export JAVA_HOME=$(/usr/libexec/java_home -v 1.7*)'Put these aliases in your ~/.bash_profile or ~/.profile, reload the profile and you're ready to go. BTW, if you haven't switched from iTerm to iTerm2 yet, you should do it now ;-).
Showing posts with label bash alias jdk. Show all posts
Showing posts with label bash alias jdk. Show all posts
04 June 2012
How to Change JDK Version From the Command Line
Subscribe to:
Posts (Atom)