Time for action – checking the prerequisites
Hadoop is written in Java, so you will need a recent Java Development Kit (JDK) installed on the Ubuntu host. Perform the following steps to check the prerequisites:
First, check what's already available by opening up a terminal and typing the following:
$ javac $ java -version
If either of these commands gives a
no such file or directory
or similar error, or if the latter mentions "Open JDK", it's likely you need to download the full JDK. Grab this from the Oracle download page at http://www.oracle.com/technetwork/java/javase/downloads/index.html; you should get the latest release.Once Java is installed, add the
JDK/bin
directory to your path and set theJAVA_HOME
environment variable with commands such as the following, modified for your specific Java version:$ export JAVA_HOME=/opt/jdk1.6.0_24 $ export PATH=$JAVA_HOME/bin:${PATH}
What just happened?
These steps ensure the right version of Java is installed and available from the command line...