Yep this is about class path setting. Are you work on an IDE or on notepad. If you work on notepad and command prompt, just set the class path to the working folder and test that works. I'm sure that something wrong with you system variables, if you change them.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.