title: Getting 'Exception in thread "main" java.lang.NoClassDefFoundError: org/ini4j/Ini' error after succesfully compiling source file from the CLI
body: <p>Background:
  I am trying to use ini4j for the purpose of parsing config files in the ini format.</p>
  
  <p>I run the command:
  javac -classpath ini4j-0.5.4.jar   Driver.java
  and the compilation goes smoothly...however when I attempt to run the program running:
  java Driver
  I get this error: </p>
  
  <p><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/ini4j/Ini
      at Clock.main(Clock.java:13)
      Caused by: java.lang.ClassNotFoundException: org.ini4j.Ini
      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)
      ... 1 more</code></p>
  
  <p>From what I understand this error is a product of the jvm being able to find the class file being referenced in the error and failing.  I checked the ini4j jar file and confirmed that the Ini.class file does in fact exist.   Can anyone please tell me what am I missing here ?</p>
  
  <p>The following is my source code:</p>
  
  <pre><code>import java.util.Map;   
  import java.io.IOException;
  import java.io.File;
  import org.ini4j.* ;
  public class Driver{
      public static void main(String[] args){
          System.out.println("running in Clock-J main()");
          String fileName = "./test.ini" ;
          File fileObject = new File(fileName);
          try{
              Ini ini = new Ini(fileObject);
          }catch(IOException e){
              String exception = e.toString() ;
              e.printStackTrace();
          }
       }
  }
  </code></pre>