Run a command that exports your configuration:
export JAVA_HOME=/usr/libexec/java_home -v '1.6*'
This will continue only until you restart your computer, so be sure to include it in your configuration. I'm not an OSX user, so I'm not sure what the name of this file is, but it is basically equivalent to ".bashrc" for Linux. Just put the export line at the end of the file, so it will export it every time in the future. (This is probably the same file because they are both UNIX based)
Dropout
source share