Sorry, I cannot use Korean for now.


[ 다음 글들 ] [ 이어서 글올리기(답하기) ] [ 자바 묻고 답하기 ]

글쓴이 :Yoon Kyung Koo 1999년 5월 06일 17:07:49

In Reply to: [답변 안올라오면 폭파~~~~~~ 제발] 여긴 답변이 너무 안올라와요..... posted by 고봉수 on 1999년 5월 05일 15:29:47:

I think it does work.
If you want to get the output of execed process,
you can use like this :


Process ps = Runtime.getRuntime().exec("java Goo");
try {
BufferedReader br=
new BufferedReader(new InputStreamReader(ps.getInputStream()));
String str=null;


while ((str=br.readLine())!=null) {
System.out.println("OUTPUT:"+str);
}
} catch (IOException ie) {
// do something to handle exceptions
}


What's subject to be thought wrong is that
you should use getInputStream to get stdout of execed process,
and getErrorStream to get stderr,
getOutputStream to get stdin.



다음 글들:



이어서 글올리기(답하기)

이름:
E-Mail:
제목:
내용:
HTML 태그 포함 여부: HTML 문서일 경우 체크
관련 URL(선택):
URL 제목(선택):
관련 이미지 URL:


[ 다음 글들 ] [ 이어서 글올리기(답하기) ] [ 자바 묻고 답하기 ]