Parser for command line parameters in Java/C/C++/Python/shell
getopt is also usable in Python and shell. Python has the argparse module, which is much  easier to use (particularly for more complex argument parsing), but if you want consistency across all those languages, I don't know of any better option than getopt. If Java doesn't have a getopt implementation, you could possibly write one yourself without too much effort.
I am looking for a library to parse command-line parameters that would work identically in Java, C/C++, Python and (preferably) shell.  By "identical" I mean (1) have exactly the same rules for parsing of the parameters in all three languages, (2) use the same configuration files or have similar API to specify the parameters, (3) have similar APIs to access the values of the parameters.  
I've always used getopt in C and Apache CLI in Java but it would be nice to use the same specification for the parameters across multiple languages.