title: kafka NoClassDefFoundError kafka/Kafka
body: <p>Regarding <a href="http://incubator.apache.org/kafka/index.html" rel="noreferrer">Apache-Kafka messaging queue</a>.</p>
  
  <p>I have downloaded Apache Kafka from the Kafka download page. I've extracted it to <code>/opt/apache/installed/kafka-0.7.0-incubating-src</code>.</p>
  
  <p>The <a href="http://incubator.apache.org/kafka/quickstart.html" rel="noreferrer">quickstart page</a> says you need to start zookeeper and then start Kafka by running:<br/> <code>&gt;bin/kafka-server-start.sh config/server.properties</code></p>
  
  <p>I'm using a separate Zookeeper server, so i edited <code>config/server.properties</code> to point to that Zookeeper instance.</p>
  
  <p>When i run Kafka, as instructed in the quickstart page, I get the following error:<br/></p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: kafka/Kafka
  Caused by: java.lang.ClassNotFoundException: kafka.Kafka
          at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
  Could not find the main class: kafka.Kafka.  Program will exit.
  </code></pre>
  
  <p>I used telnet to make sure the Zookeeper instance is accessible from the machine that Kafka runs on. Everything is OK.</p>
  
  <p>Why am i getting this error?</p>