Skip to content

How to use

stalep edited this page Jun 14, 2012 · 1 revision
  1. Simple example
    
    public class Example {
        public static void main(String[] args) throws java.io.IOException {
            org.jboss.jreadline.console.Console console = new org.jboss.jreadline.console.Console();
            String line;
            while ((line = console.read("> ")) != null) {
                console.pushToConsole("======>\"" +line+ "\n");
                if (line.equalsIgnoreCase("quit") || line.equalsIgnoreCase("exit")) {
                    break;
                }
            }
        }
    }
Clone this wiki locally