Liam
Liam

Reputation: 20940

What is the best way of parsing many complex command-line arguments in Java?

I have used getopt in Python and was hoping there would be something similar in Java.

Please give a reason why your answer is better than the others.

Upvotes: 9

Views: 3126

Answers (4)

anjanb
anjanb

Reputation: 13847

https://github.com/kohsuke/args4j -- has pretty good features PLUS MIT license

Upvotes: 2

user177800
user177800

Reputation:

Look at Java Simple Argument Parser. Very mature and feature complete argument parser for Java. JSAP

Upvotes: 2

bernardn
bernardn

Reputation: 1751

I use Jewelcli and it's quite good.

You can also find a discussion of different available libraries here.

Upvotes: 6

C. K. Young
C. K. Young

Reputation: 222973

Commons CLI

Upvotes: 6

Related Questions