What is a good way of parsing command line arguments in Java?
Yeap.
I think you're looking for something like this: http://commons.apache.org/cli
The Apache Commons CLI library provides an API for processing command line interfaces.