Is there any way I can pass the all the files in the program and NOT on the command line
The arguments in my previous post are not files - they are globbing patterns. It is important that you understand the difference. j*.txt could match thousands of files and you would still only need the one command line argument.
OTOH, if you need a huge list of patterns the first question is "Why?". Perhaps they can be amalgamated. If not you can simply refer to this huge list of patterns by loading them from a local datafile or from a URL or from a database or from somewhere else.