import java.lang.Process;
import java.io.*;
import java.io.InuputStream;
import java.io.IOException;
public class newsmail{
public static void main(String[] args) throws IOException{
String command = "java Newsworthy_RB";
Process child = Runtime.getRuntime.exec(command);
int c;
InputStream in = child.getInputStream();
while((c=in.read())!=-1){
System.out.print((char)c);
}
in.close();
command = "java Newsworthy_CA";
Process child = Runtime.getRuntime.exec(command);
InputStream in = child.getInputStream();
while((c=in.read())!=-1){
System.out.print((char)c);
}
in.close();
}
위의 코드에서 설명한대로 두 개의 Java 프로그램을 차례로 실행하고 있습니다. 첫 번째 프로그램 (Newsworthy_RB)에 오류가 발생하면 프로그램이 종료되어 오류가 표시됩니다. 대신 두 번째 프로그램 (Newsworthy_CA)을 계속 실행합니다. 친절하게 조언을 ... 오류 스트림을 얻기 위해 수행해야 무엇 실행 중에 오류가 인쇄되면 프로그램 중지
...
이 좀 더 설명하시기 바랍니다 ... 은 자바 초보자입니다 .... – LGAP
누군가가 친절하게 .. – LGAP
고마워 날 제발 도와 ... – LGAP