// Codigo para leer la salida standard try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str = ""; while (str != null) { System.out.print("> prompt "); str = in.readLine(); process(str); } } catch (IOException e) { //Excepciones capturadas }