| Author |
class path error
|
Dorj Galaa
Ranch Hand
Joined: May 29, 2001
Posts: 113
|
|
I'm use below structure set class path java -classpath c:\ddd but displaying error below Usage: java [-options] class [args...] (to execute a class) or java -jar [-options] jarfile [args...] (to execute a jar file) where options include: -cp -classpath <directories and zip/jar files separated by ;> set search path for application classes and resources -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -showversion print product version and continue -? -help print this help message -X print help on non-standard options how to set classpath from promt; ------------------
|
Senior software engineer
|
 |
Nigel Browne
Ranch Hand
Joined: May 15, 2001
Posts: 673
|
|
try java -cp c:\ ddd you must leave a space between the path and the class file.
|
 |
Samith Nambiar
Ranch Hand
Joined: Mar 14, 2001
Posts: 147
|
|
hi setting the classpath helps the java applications find the user defines classes. By specifying java -cp/-classpath path classfile you r overiding the default classpath which is set. If ddd is your class file then your command would be java -cp . ddd "." specifies all the files in the current directory. hope that helps Samith.P.Nambiar  <pre> \```/ (o o) harder u try luckier u get -------oOO--(_)--OOo---------------------------- </pre>
|
 |
 |
|
|
subject: class path error
|
|
|