Configuration hadoop-1.2.1 appears Localhost:Error:JAVA_HOME is not set.
The specific:
[Email protected]:~/hadoop-1.2.1$ start-all.sh
Starting Namenode, logging to/home/hadoop/hadoop-1.2.1/libexec/. /logs/hadoop-hadoop-namenode-dy-virtual-machine.out
Localhost:starting Datanode, logging to/home/hadoop/hadoop-1.2.1/libexec/. /logs/hadoop-hadoop-datanode-dy-virtual-machine.out
Localhost:Error:JAVA_HOME is not set.
Localhost:starting Secondarynamenode, logging to/home/hadoop/hadoop-1.2.1/libexec/. /logs/hadoop-hadoop-secondarynamenode-dy-virtual-machine.out
Localhost:Error:JAVA_HOME is not set.
Starting Jobtracker, logging to/home/hadoop/hadoop-1.2.1/libexec/. /logs/hadoop-hadoop-jobtracker-dy-virtual-machine.out
Localhost:starting Tasktracker, logging to/home/hadoop/hadoop-1.2.1/libexec/. /logs/hadoop-hadoop-tasktracker-dy-virtual-machine.out
Localhost:Error:JAVA_HOME is not set.
Workaround:
There is a hadoop-env.sh file in the/hadoop-1.2.1/conf/folder that is configured to configure variables related to the Hadoop runtime environment.
Found it:
# The Java implementation to use. Required.
# Export Java_home=/usr/lib/jvm/java-6-sun
Remove the # number and change it to:
Change to your native JDK path and exit after execution
: Wq
If you do not know your JDK path, you can perform the echo $JAVA _home to view it first.
Configuration hadoop-1.2.1 appears Localhost:Error:JAVA_HOME is not set.