I have tried the others link on this portion, but still unable to get what I need. Thus I would like to seek help from the group here.
Below is my code:
try {
String file = new File("iperf3.exe").getCanonicalPath();
String cmd1[] = {file,"-c","ping.online.net","-P","10","-w","710000"};
Process p1 = Runtime.getRuntime().exec(cmd1);
BufferedReader input1 = new BufferedReader(new InputStreamReader(p1.getInputStream()));
String line1;
while ((line1 = input1.readLine()) != null) {
txtConsole1.setText(line1);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
The output message to the textArea is only the last message from executing the command. May I know how can I stream all the output messages into the textArea?
Thank you.