title: Java HttpComponents "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ParseException"
body: <p>I'm developing a Java application using Apache HttpComponents.
  I downloaded the "5.0.zip" from <a href="https://hc.apache.org/downloads.cgi" rel="nofollow noreferrer">https://hc.apache.org/downloads.cgi</a> today and then added it as user library to my classpath in Eclipse. Everything is working fine.</p>
  
  <p>However, when I compile the Application and try to use it outside of Eclipse, I get the following error message:</p>
  
  <pre><code>Error: A JNI error has occurred, please check your installation and try again
  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ParseException
          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 sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
          at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
  Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ParseException
          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)
          ... 7 more
  </code></pre>
  
  <p>I really don't know what causes this or how I can fix it...help is greatly appreciated!</p>