title: ClassNotFoundException thrown when compiling basic Hello World Program
body: <p>I am just trying to compile and run a very simple test program, but it simply will not work, and I have no idea what the problem is. </p>
  
  <p>I have a java project that's been heaped on me, and I know little to nothing about java. Especially compiling from the windows command line. </p>
  
  <p>I have two Jars that I need to compile a simple "hello world" program with. </p>
  
  <p>Here's my "build.bat"</p>
  
  <pre><code>C:\jdk1.6.0_21\bin\javac -cp "C:\Users\FREYERA\Desktop\Test";"C:\Users\FREYERA\Desktop\Test\test1.jar";"C:\Users\FREYERA\Desktop\Test\test2.jar"; "C:\Users\FREYERA\Desktop\Test\sample.java"
  </code></pre>
  
  <p>Then, I:</p>
  
  <pre><code>C:\jdk1.6.0_21\bin\java sample
  </code></pre>
  
  <p>This spits back the error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.NoClassDefFoundError: sample
    Caused by:
    java.lang.ClassNotFoundException:
    sample
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native
    Method
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
            at java.lang.ClassLoader.loadClass(ClassLoader.java:248)</p>
  </blockquote>
  
  <p>No matter how I set up my classpath, I cannot for the life of me get this HELLO WORLD program to run. </p>
  
  <p>Can someone please help me out? I'm pulling my hair out. </p>