title: java.lang.NoClassDefFoundError: edu/stanford/nlp/parser/lexparser/LexicalizedParser
body: <p>I am working with Stanford Parser API. My system specifications are listed below:</p>
  
  <p>OS: Win8</p>
  
  <p>IDE: .IntelliJIdea14 </p>
  
  <p>JDK: 1.8</p>
  
  <p>Stanford-Parser 3.5.2 Version</p>
  
  <p>I have imported stanford-parser.jar and ejml-0.23.jar in module dependencies (ClassPath). 
   There are some parser models that are saved in a jar file named stanford-parser-3.5.2-models.</p>
  
  <p>The Stanford support team says: </p>
  
  <blockquote>
    <p>"In recent distributions, the models are included in a jar file inside
    the parser distribution. For example, in the 2012-11-12 distribution,
    the models are included in stanford-parser-2.0.4-models.jar The
    easiest way to access these models is to include this file in your
    classpath. The parser will then be able to read the models from that
    jar file. " </p>
  </blockquote>
  
  <p>But I can't import  stanford-parser-3.5.2-models.jar file. So I extracted it, save the model in an appropriate address in D Drive and finally changed the following code:</p>
  
  <pre><code>String parserModel = "edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz";
  
  LexicalizedParser lp = LexicalizedParser.loadModel(parserModel);
  </code></pre>
  
  <p><strong>To</strong></p>
  
  <pre><code>String parserModel = "D:\\ MasterofScience\\Tools\\Stanford Dependenct Tree\\models" +
      "\\lexparser\\englishPCFG.ser.gz";
  
   LexicalizedParser lp = LexicalizedParser.loadModel(parserModel);
  </code></pre>
  
  <p>But I give these exception errors:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: edu/stanford/nlp/parser/lexparser/LexicalizedParser
  at java.lang.Class.getDeclaredMethods0(Native Method)
  at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
  at java.lang.Class.privateGetMethodRecursive(Unknown Source)
  at java.lang.Class.getMethod0(Unknown Source)
  at java.lang.Class.getMethod(Unknown Source)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:119)
  Caused by: java.lang.ClassNotFoundException: edu.stanford.nlp.parser.lexparser.LexicalizedParser
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  ... 6 more
  </code></pre>
  
  <p>Even I Don’t change the code, I receive the same exception!
  What should I do?</p>