Jakarta's commons-cli package is designed to make working with command line arguments from Java easy. I'm using it for some of my Classifier4J demos. I have to admit that while the documation is pretty good, I had some trouble getting going with it. The main problem I found was that the documetation uses the PosixParser to parse the command line, but I couldn't figure out how to pass the arguments to to program to make it accept them. Once I switched to using the GnuParser or the BasicParser it all worked as expected.
That brings up an interesting point – documentation is difficult to write because the person writing it often has possibly incorrect assumptions about what the user needs to know before the documentaton will help them.