The very first exercise in this trail is the compiling and execution of a little application called HelloWorldSwing. I have copied the code from the tutorial and pasted it into emacs. I then compiled it into the same directory into which I had saved the source code. The compile was clean; I checked to be sure that the source and class files were in the same directory (after the execution attempt bombed horribly). I have checked the FAQs in the tutorial; they are no help. Everything that I have copied from Head First
Java as well as the stuff that I have written myself has run all right (within findable errors on my part, like null pointers). Could someone please suggest where I should look to get a handle on this?
I am using Windows XP. The errors are as follows:
Exception in
thread "main" java.lang.NoClassDefFoundError: HelloWorldSwing (wrong name: start/HelloWorldSwing)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.define Class(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
The source code is: