java -version still returns:java version " 1.6.0_65'java(tm)="" se="" runtime="" environment="" (build="" 1.6.0_65-b14-466.1-11m4716)java="" hotspot(tm)="" 64-bit="" server="" vm="" 20.65-b04-466.1,="" mixed="">
When I open config app for it it shows this
1 . Add such shell to your $HOME/.bash_profile
2 . Run command source ~/.bash_profile
3 . Then type 'setJdk7' to use JDK7, 'setJDK8' to use JDK8
It turns out that it is not enough to install JRE on Mac OS to have it registered and listed by /usr/libexec/java_home -V command. You have to install full JDK for it.