728x90 반응형 SMALL Java runtime1 Java ProcessBuilder, Runtime,, linux 에서 사용하기 import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; public class ExecTest { public static void main(String args[]) throws IOException { String[] command = {"/bin/sh", "-c", "/test/test_shell.sh"}; try{ Process ps = Runtime.getRuntime().exec(command); BufferedReader br = new BufferedReader(new InputStreamReader(ps.getInputStream())); String line; while( (lin.. 2013. 12. 21. 이전 1 다음 728x90 반응형 LIST