Gonzalez Posted September 29, 2009 Report Posted September 29, 2009 import java.util.*;import java.io.*;public class console{public static void main(String args[]) { String text =""; BufferedReader in; PrintWriter out = new PrintWriter(System.out); try { Process p = Runtime.getRuntime().exec("cmd /c dir"); in = new BufferedReader(new InputStreamReader(p.getInputStream())); while ((text = in.readLine()) != null) { out.println(text); out.flush(); } } catch (IOException e) { e.printStackTrace(); } }} Quote