Possible Duplicate:
Java Library: Command Line Option Parser
I have to build a Java application that will be launched with this command line:
myapplicationname [–n num] [-x num –y num] [-t] [-a]
How can I do this?
I use args[i] to collect the arguments from the command line but I’m looking for other form to do this.
You should definitely have a look at commons-cli to parse your command line parameters. Plus, you need to create a script (bash or batch) to start your app, or in alternative do something similar to this: Self executing jar files (article from my blog).