Just for anyone who needs it…

I’ve recently found this amazing java library, called JSAP (Java Simple Argument Parser), which is used to parse command line arguments. I’ve always had the problem of no ‘getopt’ in java (in C++ getopt is in the standard library). Not only does this provide what getopt does in C++, but it also provides short/long flags, switches, unflagged arguments, and it generates help text!

I have to say, it works great with jME (I mean, its simple and allows you to specify extra stuff to jME through the command line), and I plan to use this for all my java projects!

JSAP: Java Simple Argument Parser


Also, its under the LGPL (with some extra clarification about classpaths and such. see the website). I don’t really see a reason you would have to edit the library itself (it provides everything you need, and I believe can be extended), so the LGPL shouldn’t really matter that much.