This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi Gaurav, There is no '-cs' option for 'java.exe' They may have meant to type '-cp'. Anyway, I think they threw it in just to confuse the issue Some other languages store the name of the file used to start the application at args. The questions a trick to make sure you understand tha Java only stores the actual arguments in args. Hope that helps. ------------------ Jane Griscti Sun Certified Programmer for the Java� 2 Platform
hi gaurav, cp -sets search path for application classes and resources, i dont know whether it is in usage now, i have a class called arrayini...do this on ur cmd prompt and see what happens.... C:\bjava\array>java -cp arrayini 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 -? -help print this help message -X print help on non-standard options
please use the [code][/code] tags when showing code. visit <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page" target="_blank" rel="nofollow">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page</a> ,for more details
Joined: May 05, 2000
Originally posted by srinivas bolloju: cp -sets search path for application classes and resources, i dont know whether it is in usage now,