error in java basic test program
<pre><code>$cat JarTest.java 

package edu.testjava.simple;

public class JarTest
{
    public static void main(String args[])
    {
        System.out.println("Hello World\n");
    }
}


$javac JarTest.java

$java JarTest
</code></pre>

<p>I get error:</p>

<pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: JarTest (wrong name: edu/testjava/simple/JarTest)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    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:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: JarTest.  Program will exit.
</code></pre>

<p>Why so?</p>

<p>Anything wrong with package etc?</p>

<p>Thanks!</p>
