Ejemplo n.º 1
0
 public void run() {
   ProcessWatcher pw = new ProcessWatcher(ktbsProcess);
   InputStream output = ktbsProcess.getInputStream();
   while (!pw.isFinished()) {
     BufferedReader reader = new BufferedReader(new InputStreamReader(output));
     String line;
     try {
       while ((line = reader.readLine()) != null) {
         out.println(line);
       }
       Thread.sleep(500);
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
 };