How come command line isn't recognizing this java command? -



How come command line isn't recognizing this java command? -

i come in java -classpath c:\blahblahblah\software_engineering\cs2.jar part of suggestion here: why ide find jar command line doesn't? .

i'm pretty sure valid command, instead receive tired list:

usage: java [-options] class [args...] (to execute class) or java [-options] -jar jarfile [args...] (to execute jar file) options include: -server select "server" vm -hotspot synonym "server" vm [deprecated] default vm server. -cp <class search path of directories , zip/jar files> -classpath <class search path of directories , zip/jar files> ; separated list of directories, jar archives, , zip archives search class files. -d<name>=<value> set scheme property -verbose[:class|gc|jni] enable verbose output -version print product version , exit -version:<value> require specified version run -showversion print product version , go on -jre-restrict-search | -jre-no-restrict-search include/exclude user private jres in version search -? -help print help message -x print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions -esa | -enablesystemassertions enable scheme assertions -dsa | -disablesystemassertions disable scheme assertions -agentlib:<libname>[=<options>] load native agent library <libname>, e.g. -agentlib:hprof see also, -agentlib:jdwp=help , -agentlib:hprof=help -agentpath:<pathname>[=<options>] load native agent library total pathname -javaagent:<jarpath>[=<options>] load java programming language agent, see java.lang.instrument -splash:<imagepath> show splash screen specified image

how come?

you're giving classpath, not name of class execute. you're only including jar file on classpath - not directory containing class file.

so repeat reply other question:

java -cp .;cs2.jar cb

(run directory containing both cb.class , cs2.jar.)

java command-line jar classpath

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -