I am arun.I dont get my jdk working properly.I have tried all the possiblities.I am using the version jdk1.3.1_18.I am having my class file in the directory where I run the "java AdviceClient"(classfilename) command but I get the error as
Most likely, you've got your CLASSPATH environment variable set, and that setting doesn't include "." (dot), the current directory. Also note that letter case matters: it's either AdviceClient or Adviceclient -- be sure to use whichever is the actual name of the class.
Mr.Ernest Friedman-Hill I get the same error.I am correct with all the aspects but I still get the error.I knew very well about CLASSPATH and other basic things.Actaully I am a Java Programmer,but I haven't met with a situation like this ever before.So please try to give me any other solution.
author and iconoclast
A possibility: Is AdviceClient in the default package or in another package? If it is in another package then starting from the directory where the class exists will not work as the loader will look in the directory built from the package name.
author and iconoclast
Chris is right that it wouldn't work, but then the error message would say something about "Wrong name" and include the package name.
Joined: Jul 25, 2006
Thanks Mr.Chris Beckey and Mr.Ernest Friedman-Hill for your suggestions.Finally I got by just restaring my pc.After restarting it I just tried it with no hope and unpredictably I got it,I haven't changed any PATHS before restarting the computer.Any how I got it.But this type of misseries happens in the JAVA WORLD.Onething what I was fed up with is I couldn't able to find the reason for the problem.Any way thanks to both of you for spending your time and giving suggestions.
I don't know if you copy-and-pasted this verbatim from the command prompt or not, but notice that Java was looking for class "Adviceclient" with a lower-case c. If the class was really called AdviceClient, it's not strange that it can't find the class.
You just have to be careful and precise.
Originally posted by Arun Arun: Onething what I was fed up with is I couldn't able to find the reason for the problem.
Here's a tip: Whenever you get an error like that, copy and paste the error message into Google. This particular error (NoClassDefFoundError) is the number one problem that beginning Java programmers encounter. You could have found the answer very quickly with Google. [ July 25, 2006: Message edited by: Jesper Young ]
Mr.Jesper Young the class name is Adviceclient.Then how could I able to get the output correctly when I restarted my pc.I am not up to that low level of a begginer.This is not to hurt you but I discuss the problem which I had gone through.I was working with Java for the past 18 months so how could I do this basic mistake.Any way a lot of thanks for your suggestion.I welcome it. [ July 25, 2006: Message edited by: Arun Arun ]