2011-01-08 68 views

回答

6
Process proc = Runtime.getRuntime().exec("ls -la"); 

這將執行ls -la命令並返回的過程。如果你想要更復雜的交互,你應該使用輸入和輸出流:proc.getInputStream()proc.getOutputStream()

相關問題