File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Pls help me,so silly question! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Pls help me,so silly question!" Watch "Pls help me,so silly question!" New topic

Pls help me,so silly question!

long sun

Joined: Feb 24, 2001
Posts: 18
I installed jdk1.2.2 in Windows2000,it can compile ,but when i run,it gave me an error "Exception in thread "main" java.lang.NoClassDefFoundError:ClassName",i've already try a lot of programms,but the result is the same,i am very confusing,i can not
find the reason ,i'm anscious to hear for someone to help me,thanks!
Andy Ceponis
Ranch Hand

Joined: Dec 20, 2000
Posts: 782
Im not sure what your exact problem is, all i know is that it has nothing to do with win2k. I run win98 and 2k and there has never been a difference as to how java runs under them. The only difference was in 2k it was ALOT easier to set the path.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
You need to set a CLASSPATH parameterto include the directory that your compiled class is in.
However I do not know how Windows2000 handles the Autoexec.bat and DOS prompts. But. . . since you seem to have set your PATH parameter to include the directory that your Sun classes are in, perhaps you have already figured that part out.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Kathy Lynch

Joined: Feb 26, 2001
Posts: 25
I think that you're going to have to recompile all of your classes in 1.2.2...I had a similiar problem and when I recompiled everything it worked fine!
Good luck!
I agree. Here's the link:
subject: Pls help me,so silly question!
It's not a secret anymore!