Howdy (I've always wanted to say that (and mean it) from some strange reason),
I'de first like to say that this site is awsome, I love the theme and with all these java experts around, I am wondering if I can hang my hat for a little while (ok, enough with the silliness(SP?), I am aware that it can annoy some grumpy folks after a while :-)).
Ok, down to business. I have the JDK 5.0 release 7 and I have it installed in just one folder away from my lettered drive on Windows XP, for example; (F:\Java). When I edit source code through a text editor and then compile it through the terminal it seems to compile fine and I get a pretty little class file afterwords. However, the trouble comes when I try and run the program with the 'java' command. I get a weird error? message. It reads as follows:
Exception in thread "main" java.lang.NoClassDefFoundError: helloWorld Of course in this example I used helloWorld as the name of the class that I was trying to run. It's not the code, at least I don't think so because my Mac runs the same code on the same JDK (just a different release, release 5) perfectly. This is not just isolated to one incedent either, it happens every time.
Because of my problem (well not the entire reason, I love eclipse), I am using eclipse and ofcourse with eclipse, everything works perfectly but it just erks me that I can't run my classes/apps from the terminal on my wondows machine. I also have a windows laptop but I am affraid to edit the path variables on that machine as well for fear that I might screw it up in the same way. I am new to the Windows Environment, having come back to windows because of .NET around a year ago but other than that I am used to *nix platforms such as Linux and OS X so my knowledge of windows is slim. Does anyone know what's wrong? I tried to look up: java.lang.NoClassDefFoundError in Java in a Nutshell (latest edition) and I can't seem to find anything about it, as if it doesn't exsist?
Please excuse my ignorance, I am brand spanking new to Java but not to programming (some C (old school, lol I'm 25y/o, what am I doing talking about old school?), .NET, Python and ActionScript) If anyone could help, I would be very greatful and extremely happy. (I'll have my itch scatched, you know the one the is starting to sting a little.) No really, I would be very greatful for a fix to my seemingly small but notoriously big problem. Thanks in advance
You can contact me through this e-mail.
learningjava@airspoon.com Yours Truly,
--Matt