import java.io.*;
...
try {
Process p = Runtime.getRuntime().exec("ls");
String line;
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null)
System.out.println(line);
input.close();
} catch (IOException e) {
...
}
...
基本又實用... 先記下來... :P
沒有留言:
張貼留言