import java.io.BufferedReader;
import java.io.InputStreamReader;
public class GetCmd {
    public static void main(String[] args) {
        try {
           String [] cmd = {"cmd.exe","/c","dir"} ;
           Process m ;
           String S = "" ;
           m = Runtime.getRuntime().exec(cmd) ;
           BufferedReader in = new BufferedReader(new InputStreamReader( m.getInputStream()));
           while((S=in.readLine()) != null) {
               System.out.println(S) ;
          }
       }
       catch(Exception ex) { ex.printStackTrace () ; }
    }
}


글 보관함

카운터

Total : / Today : / Yesterday :
get rsstistory!