I'm trying to install Hadoop and run it.
And I'm sure I've installed Hadoop and formatted namenode successfully.
However, when I tried to run start-dfs.sh, I got the error below:

> 
> localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-wenruo-namenode-linux.out
>  localhost: /usr/local/hadoop/bin/hdfs: line 304: /usr/local/hadoop/usr/lib/jvm/java-8-oracle/bin/java: No such file or directory
> 
> 
> 

My JAVA\_HOME is below:

> 
> echo $JAVA\_HOME
>  /usr/lib/jvm/java-7-openjdk-amd64
> 
> 
> 

My hadoop-env.sh file:

> 
> export JAVA\_HOME=${JAVA\_HOME}
> 
> 
> 

How could Hadoop is still looking for JDK8 as I already set JAVA\_HOME to JDK7?

Thank you very much.