Executing external process using java Nov 7, 2011 Runtime rt=Runtime.getRuntime(); Process x= rt.exec("ls -l"); BufferedReader stdInput = new BufferedReader(new InputStreamReader(x.getInputStream())); String s; while ((s = stdInput.readLine()) != null) { System.out.println(s); } Please enable JavaScript to view the comments powered by Disqus.