Mohammad Hasan has written down these steps from the tutorial session by Youjie Zhou. Steps to set the "JAVA_HOME" variable in the hadoop configuration file (on Ubuntu): *************************************************************************************************************************************** First: Download java $ sudo apt-get install sun-java6-jdk Second: Check the java version to make sure that it's properly installed: $ java -version Third: change the environment variable for JAVA_HOME in the hadoop configuration file: 1. Open the hadoop-env.sh file using a text editor (nano, vi, vim, emacs etc.) 2. Change the following line: # export JAVA_HOME=/usr/lib/j2sdk1.6-sun to have the correct location and then remove the pound sign: export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26/jre Four: You have to make sure that this link for JAVA_HOME variable is correct. Remember, whatever you get by default may not be the correct link. So you MUST check the link before you save the file. To check this, following are the commands: 1. $ whereis java You may get: java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz 2. $ readlink -f /usr/bin/java You may get: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin/java Then, from the above line copy only the following part: /usr/lib/jvm/java-6-sun-1.6.0.26/jre And paste it for JAVA_HOME variable as following: export JAVA_HOME = /usr/lib/jvm/java-6-sun-1.6.0.26/jre Finally, save your hadoop-env.sh file. You're done! ******************************************************************************************************************************