This might sound strange but i am trying to run something from the commande promt and it is not running but when i compie it using jcreator it works.. I am sure that i am in the right directory sice i used dir command and i have seen all files but still it getms me this strange error?? what shall i do ??
Z:\Java Files\Xpath>dir Volume in drive Z is ?? Volume Serial Number is 0BAD-0207
Originally posted by Keith Lynn: It sounds like a problem with your CLASSPATH.
If you try java -cp . Tool, what happens?
From the text you posted mate it looks like you entered "java -cp" at the prompt.
Try typing the following: Java -cp . Tool
You have to put the "." in there between the -cp and Tool. The dot basicly specifys that the current directory, which is represented by the dot ., (The dot represents "current directory")is the classpath you want to use.
Hope this helps!
If anything in this post is incorrect please correct me.... I'm a greenhorn myself. Only been learning Java for about five days now... so I could be really off, hope not though! :roll: [ July 18, 2006: Message edited by: Jesse Wilson ]
To be, or not to be?... This is no longer the question.
Joined: Aug 02, 2005
well that has worked ...so what shall i do to fix it ?
With the "-cp" option, you set the classpath, which means you tell Java where to look for class files. The "." dot indicates the current directory. So with "-cp ." you tell Java to look for class files in the current directory.
If you don't like typing "-cp ." every time, you can do one of two things:
1. Make sure that the CLASSPATH environment variable is not set (Java will use the current directory by default if it's not set). 2. Make sure that you add "." to the CLASSPATH environment variable.