Could Not Find the Main Class: HelloWorld. Program will Exit
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/10875839/jar-file-keeps-giving-me-could-not-find-the-main-class-program-will-exit">.jar file keeps giving me &ldquo; could not find the main class&rdquo;. Program will exit</a>  </p>
</blockquote>



<p>Trying to run a basic "hello World" program. I have followed step by step tutorials and i get the same error message each time:</p>

<pre><code>java.lang.NoClassDefFoundError: HelloWorld
Caused by: java.lang.ClassNotFoundException: HelloWorld
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
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)
Exception in thread "main" 
</code></pre>

<p>Here is the Program:</p>

<pre><code>public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
</code></pre>

<p>Has anyone had this same issue and know how to resolve it?</p>
