Running start-dfs.sh script should pick the java specified by JAVA_HOME which is defined in my /.zshrc and /.bashrc.
My JAVA_HOME is
$ echo $JAVA_HOME
However, when I start a local cluster using start-dfs.sh, it reports
2014-08-29 14:48:20,767 INFO [main] namenode.NameNode (StringUtils.java:startupShutdownMessage(633)) - STARTUP_MSG:
STARTUP_MSG: java = 1.8.0_20
It is expected to use JDK 7 instead. This bug only occurs on trunk, but not branch-2.