title: Extract Wikipedia Infobox data
body: <p>I want to extract the data from wikipedia infobox and came upon the code in <a href="https://stackoverflow.com/questions/20063158/wikipedia-infobox-extraction-in-java">Wikipedia infobox extraction in Java</a> that suggests a method to do so with java. I am not handy with java as I am with python so I am using the wikixmlj-r43.jar in my eclipse with the code :</p>
  
  <pre><code>import edu.jhu.nlp.wikipedia.*;
  public class InfoboxParser {
  
      public static void main(String[] args) throws Exception{
          WikiXMLParser parser = WikiXMLParserFactory.getSAXParser("/home/siddhartha/Documents/wiki/enwiki-latest-pages-articles.xml");
          parser.setPageCallback(new PageCallbackHandler() {
              public void process(WikiPage page) {
                  InfoBox infobox=page.getInfoBox();
                  //do something with info box
              }
          });
          parser.parse();
      }
  
  }
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/bzip2/CBZip2InputStream
      at edu.jhu.nlp.wikipedia.WikiXMLParserFactory.getSAXParser(WikiXMLParserFactory.java:15)
      at parser.InfoboxParser.main(InfoboxParser.java:7)
  Caused by: java.lang.ClassNotFoundException: org.apache.tools.bzip2.CBZip2InputStream
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 2 more
  </code></pre>
  
  <p>I have added the JAR in eclipse under properties > java build path > libraries. What I get is that it is not able to find CBZip2InputStream class. </p>
  
  <p>Please help. </p>