Hi,

does anybody has a "good" example for
command line parameter checking?

I write a lot of command line tools for
java, recently they have become more
complex and it´s required to check a
number of command line switches in order
to provide successfull execution of the
program.

Now the checking in general is no
problem, but i´m uneasy about which
design approach to use...

Until now i usually used an launcher
class that passes the command line args
to a "validating" module ( class ) that
also sets the class fields if the args
were correct.
I used to set the class fields in the
constructor of the "validating" class
and a lot more... that is i do a lot of
preparation/work in the constructor...
now i ask myself is that really a good
way to go or are there better/more
efficient ways...

Thanks for any advice

Volker