title: How to add jar files and compile using command prompt? (Error: A JNI error has occured,Please Check your Installation)
body: <p>I forked one project from github and when i want to run it gives error. I added <code>org.json</code> jar file to <code>jdk\lib</code> and also set the Path variable to it. I compiled code but it got no errors but when i run it i get exception as follows : (and I am running it using command prompt)</p>
  
  <blockquote>
  <pre>
  Error: A JNI error has occurred, please check your installation and
  try again Exception in thread "main" java.lang.NoClassDefFoundError:
  org/json/JSONExceptio n
          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.json.JSONException
          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)
  </pre>
    
    <p>... 7 more</p>
  </blockquote>