dcsimg
Passing "*" as command line argument
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sridhara_Reddy
Posted On:   Wednesday, July 25, 2007 03:14 PM

when asterisk(*) is passed as command line argument,
the main method's String array parameter receiving it
as a file name from the current directory. why is it so?

Re: Passing "*" as command line argument

Posted By:   Robert_Lybarger  
Posted On:   Wednesday, July 25, 2007 08:08 PM

Because, when you are using a command shell/window/terminal, your operating system gets first crack at the command line you enter before it is sent to the program. Certain special characters like the asterisk mean special things ... unless you have a way of escaping them. UNIX uses a backslash, for example. In short, read the manual for the command processor for your operating system.
About | Sitemap | Contact