Problem encountered When the char '*' is passed as command line argument-Please help!
Hi Everyone :(hi):
I am writing a console application in Java and recieving a strange problem:
The user is passing command line argument's when he start's the application.
If the user passed the following argument's: -hostName as* it means that he want's to check all the host names(here '*' has the regular expression meaning '.*') that start with 'as'
The problem is, that if there exist a file that start's with the name 'as' - in the utility directory - then the file name will be passed instead of the argument 'as*' so I will recieve - for example -
I found that only if I surround the argument with ' ' then The problem doesn't occure.
What is the problem? How can I solve this??:(sweat):