Reputation: 33263
I have a question on design implementation. So, there are two ways to run the program.
As of now, I have been working with args[0], args[1]...
Is there a way (I am sure there is), so that I can pass flag (like --input --output etc) as arguments in java.
Any suggestions on design implementation?
Upvotes: 0
Views: 79
Reputation: 6805
Yet another (simple) alternative
http://www.martiansoftware.com/jsap/
Upvotes: 1
Reputation: 22181
You can use this apache library focused on your requirement:
http://commons.apache.org/cli/usage.html
Thus, you will be able to avoid using poor args
table.
Upvotes: 3