Oddly if you pass a wild card to any Java utility, the command processor expands the wildcards so that you program for *.* will see list of all the directories and all the files, one per arg[i] slot.
This was an dumb idea. If your program is designed to handle lists of files and directories, then *.* effectively asks it to process not only each file in the current directory, but each directory (and presumably all its files as well). It ends up processing one deep in the directory tree nest, where *.* normally just processes the files in the current directory.
In windows, you can subvert this expansion, by putting quotes around the wildcards, e.g. "*.html". In Linux, bash you can subvert the globbing with \ quoting, e.g. \*.html Then your program will get the command-line parameters unexpanded.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.17] | The information on this page is for non-military use only. | ||
| You are visitor number 5,438. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/Mindprod website mirror) | ||
| http://mindprod.com/jgloss/wildcard.html | J:\mindprod\jgloss\wildcard.html | ||