Article View: borland.public.jbuilder.java.language
Article #15141Runtime and Interactive mode
From: Kevin
Date: Thu, 01 Jul 1999 00:00
Date: Thu, 01 Jul 1999 00:00
20 lines
1259 bytes
1259 bytes
Hi, all Experts
I create a UI for displaying results of a program (test.exe) written by
C language. I use Runtime() to collect the results and display it, like list
below:
String testcase = "test.exe testfile";
Runtime runtime = Runtime.getRuntime();
Process vckprocess = runtime.exec(testcase);
BufferedReader br = new BufferedReader(new
InputStreamReader(vckprocess.getInputStream()));
while (true) {
String linein = br.readLine();
if (linein == null) break;
console_jTextArea.append(linein + '\n');
But now, I have a big problem, the test.exe has a interactive mode, that is
say, I must display the partial result then listen to the keyboard, accept
the keyin string and back to the test.exe and show the result.....
Who can tell me how to do and work, Thanks!
Kevin
Technical Details
Message-ID:
<7lepib$str6@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7d9c16eb02f09efa,start X-Google-Attributes: gidf74b3,public From: "Kevin" <kevin1645@gcn.net.tw> Subject: Runtime and Interactive mode Date: 1999/07/01 Message-ID: <7lepib$str6@forums.borland.com> X-Deja-AN: 495878844 Organization: Avery Newsgroups: borland.public.jbuilder.java.language X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3