Background
In Java, I want to create a simple, quick console application that provides a series of menus and enters user input, then calls certain methods and displays other menus. Basically, I need to create a loop:
menu > user selection > action > menu > ...
Ultimately, I use this on top of the integration server using Apache Camel. I have a "quick and dirty" application that I use to implement some server routes as a development tool. I do not want to spend much time on something so simple.
There should be an easy way to do this. Consoles and menus on the command lines have been around for decades! There should be a Java library that does this well. I just did not find ...
Question
Is there a library or some kind of Apache utility or something that would make creating console menus a super fast, super simple piece of cake?
Example
When using a suitable tool to create a menu that works like, for example, git add -i
That is, I need to do something similar to git Interactive commands or any other console application, and I want to do it so fast .
EDIT:
The use of "Cliche" suggested below worked pretty well, allowing me to simply comment on some methods and automatically create menus from this. If this helps someone, I would like to include some important notes on how to get ClichΓ© to work:
- Project transferred to google code
- It doesn't seem to be supported, but in the question section, jbachorik lured the project!
- Here are the settings I need to make for my POM:
Add repo:
<repository> <id>sonatype-nexus-snapshots</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository>
Add dependency:
<dependency> <groupId>com.googlecode.cliche</groupId> <artifactId>cliche</artifactId> <version>1.0-SNAPSHOT</version> </dependency>
source share