title: Could not find or load main class org.apache.hadoop.util.VersionInfo
body: <p>I followed "<a href="http://codesfusion.blogspot.com/2013/10/setup-hadoop-2x-220-on-ubuntu.html" rel="noreferrer">http://codesfusion.blogspot.com/2013/10/setup-hadoop-2x-220-on-ubuntu.html</a>" to install hadoop on ubuntu. But, upon checking the hadoop version I get the following error:</p>
  
  <blockquote>
    <p>Error: Could not find or load main class
    org.apache.hadoop.util.VersionInfo</p>
  </blockquote>
  
  <p>Also, when I try: <strong>hdfs namenode -format</strong></p>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>Error: Could not find or load main class
    org.apache.hadoop.hdfs.server.namenode.NameNode</p>
  </blockquote>
  
  <p>The java version used is:</p>
  
  <pre><code>java version "1.7.0_25"
  OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
  OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
  </code></pre>