private void callCMD() throws Throwable { StreamGobbler errorGobbler; StreamGobbler outputGobbler; // Execute args command... Runtime rt = Runtime.getRuntime(); Process proc = rt.exec(this.cmd); // Check Error... errorGobbler = run(proc, "ERR", this.delay); // Check Output... outputGobbler = run(proc, "ICC", this.delay); // Any error??? proc.waitFor(); // Set Error List... List<String> tmp_linese = new ArrayList<String>(); tmp_linese = errorGobbler.getOs_lines(); // Set Output List... List<String> tmp_linesi = new ArrayList<String>(); tmp_linesi = outputGobbler.getOs_lines(); if (tmp_linesi.size() > 0) this.setGetOutList(tmp_linesi); else this.setGetOutList(tmp_linese); }