try { Process proc = Runtime.getRuntime().exec("***"); [b]int i = proc.waitFor();[/b] System.out.println(i); }catch(Exception e){ ... } ...