Runtime.getRuntime().exec()
方法。,,``java,try {, Process process = Runtime.getRuntime().exec("ls -l");, BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));, String line;, while ((line = reader.readLine()) != null) {, System.out.println(line);, },} catch (IOException e) {, e.printStackTrace();,},
``