Hello,
I'm trying to teach myself
java from a book. I'm having problems, and I've seen others with this problem but I can't seem to get the solutions offered to work for me. So here goes:
First, I'm running a basic installation of Windows XP with SP2. I have installed the jdk1.6.0_02 stuff from sun. When I write the programs, I put them in a simple directory called c:\files. Pretty basic stuff, but ..
I can't get them to run. Here's the error I see on other posts:
Exception in
thread "main" java.lang.NoClassDefFoundError: c:\files\Doobee
I am assuming this is a class path error. But when i try to specify the class path with -cp . , i still get the same error:
C:\Program Files\Java\jdk1.6.0_02\bin>java -cp .files C:\files\DooBee.class
Exception in thread "main" java.lang.NoClassDefFoundError:C:\files\DooBee/class
Some further info: In my frustration to fix this, I uninstalled and reinstalled jdk1.6.0. That did not fix my problem with running the class files, but it did add another problem. Now I can't even get the javac or java executables to run unless I'm in the \bin directory, which of course means that they are not in my path. I have added a . to the classpath environment variables and that does not work. And now I can't get the jdk1.6.0 added to my path either. So I'm doubly in trouble now. Am I missing something in XP? I haven't been running it for that long.
This is a frustrating problem to say the least. I am not a computer novice. I've worked in tech for nearly 10 years. I know paths and I've programmed in VB fairly extensively. But this is driving me nuts, so if someone can please help me, I'd appreciate it a great deal.
Thanks.