Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there good Java libraries that facilitate building interactive shell-style applications?

Tags:

java

I need to write a simple shell-style application in Java. It would be nice to use a library that takes care of parsing commands and takes care of things like flags and optional/mandatory parameters...

Something that has built-in TAB completion would be particularly great.

like image 279
carrier Avatar asked Feb 06 '09 18:02

carrier


3 Answers

You can use JLine for editing and Apache Commons CLI for command line parsing.

like image 91
Sean McCauliff Avatar answered Sep 28 '22 02:09

Sean McCauliff


BeanShell ?

like image 31
Morendil Avatar answered Sep 28 '22 02:09

Morendil


I much prefer either JewelCLI or args4j over Apache Commons CLI.

There is a good, if somewhat inflammatory, roundup of several java CLI options parsers here.

like image 32
Jason Day Avatar answered Sep 28 '22 01:09

Jason Day