Note that there are some explanatory texts on larger screens.

plurals
  1. POActivity log not getting continuously updated in JavaFX
    primarykey
    data
    text
    <p>I am executing some commands on linux using JSCH and taking output of that command and printing same on the activity log in my JAVAFX application.</p> <p>Here is a problem: the activity log area is getting stuck after printing some line. But, if I switch from the window and back application continues to print lines on log area. I have debugged several times but wasn't able to catch the problem.</p> <p>Below is the code</p> <pre><code>channel.connect(); PrintStream commander = new PrintStream(channel.getOutputStream(), true); commander.println(command_cd); commander.println(" exit;"); commander.close(); InputStream outputstream_from_the_channel = channel.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(outputstream_from_the_channel)); String jarOutput; BufferedWriter bw = new BufferedWriter(new FileWriter(resultLogFile.getAbsolutePath(), true)); while ((jarOutput = reader.readLine()) != null) { this.logger.info("Status Update = " + jarOutput); System.out.print("Status Update on screen ="+jarOutput + "\n"); bw.write(jarOutput); bw.newLine(); outputFromUnix.append(jarOutput).append("\n"); // Display in activity log area in realtime. if (DeploymentTaskController.actLogTArea != null) { System.out.println("outputFromUnix.toString()----&gt;&gt;&gt;&gt;&gt; " + outputFromUnix.toString()); //actlogArea is TextArea DeploymentTaskController.actLogTArea.setText(outputFromUnix.toString()); DeploymentTaskController.actLogTArea.end(); } } bw.close(); reader.close(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload