With my latest update of OSX it knocked out my java6 so I had to go dig up this solution again and came across your question. Not sure whether to put this as an answer or comment, but this solution has worked the best for me:
Mac OS X and multiple Java versions
To summarise: (a large part of this is just copy paste from the link above)
1) Install homebrew, jenv, & homebrew-cask
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install jenv
brew tap caskroom/cask
2) Add the "caskroom/versions" tap to homebrew using
brew tap caskroom/versions
3) Install Java6 (or whatever version you want)
brew cask install java6
4) Add java version to jenv
jenv add <javaVersionPathHere>
See jenv docs for more info:
http://www.jenv.be/
I especially recommend using the 'jenv local' setup so you can specify java6 for one specific directory.