HI every body, Marry x-mass and a happy new yeay to all of you ppl. I have downloaded j2sdk and want to run the executable programms like java , javac and other from any directory. So I set the Path variable in windows XP professional and it look working fine. But when It is giving me an error message when I run the compliled files. The message I am getting is Exception in thread "main" java.land.NoClasseDefFoundError : C:\java\bin\nameofthefile can some one give a little hint or some direction so that I can move on. Thank U
Joined: Dec 24, 2002
Hey Solomon, Is this error being thrown when you use javac/java or only when you try to execute the files you have already compiled. This would be of help to answer you
A common mistake is to not have the current directory in your CLASSPATH. Make sure that "." appears in your CLASSPATH. Then if you cd to C:\java\bin and run "java nameofthefile" it will be able to find the class because you included the current directory in your CLASSPATH. If you are using packages, then you need to make sure that the top-level directory is in your CLASSPATH as well. Also, remember that any time you make a change to your env variables, you need to open a new command prompt to get the changes.
Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"