title: How to run class files from jar file, where class files are in bin filder
body: <p>I have used the command <code>jar -cvf myjar.jar javaproject</code> for the creating jar file of the entire Java project</p>
  
  <p>I am unable to run class file from jar file, I have given like that in command prompt:</p>
  
  <pre><code>D:\Automation&gt;java -cp myjar.jar bin.Test.First
  </code></pre>
  
  <p>The following exception is occurred:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: bin/Test
  Caused by: java.lang.ClassNotFoundException: bin.Test.First
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Metho
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sourc
          at java.lang.ClassLoader.loadClass(Unknown Source)
  Could not find the main class: bin.Test.First.  Program will exit.
  </code></pre>
  
  <p>My project structure like this in Eclipse:</p>
  
  <pre><code>javaproject 
    |
    |- src 
       |
       |- package(Test)
          |
          |- First.java     
  </code></pre>
  
  <p>Note: class files comes bin folder, while I saved the Test.java file in Eclipse, where src is not the system creation folder, it is created by Eclipse</p>