From 9fdb5d4c51e61b86025ac93725373ef203a2771f Mon Sep 17 00:00:00 2001
From: Derek Bankieris <derek.r.bankieris@nasa.gov>
Date: Tue, 29 Nov 2016 15:59:36 -0600
Subject: [PATCH] Merge input and error streams for plotting apps

Refs #355
---
 .../trick/dataproducts/DataProductsApplication.java   | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/trick_source/java/src/trick/dataproducts/DataProductsApplication.java b/trick_source/java/src/trick/dataproducts/DataProductsApplication.java
index 67f6c288..6a174fb8 100644
--- a/trick_source/java/src/trick/dataproducts/DataProductsApplication.java
+++ b/trick_source/java/src/trick/dataproducts/DataProductsApplication.java
@@ -605,10 +605,10 @@ public abstract class DataProductsApplication extends TrickApplication {
         if (plotDevice.equals(Session.DEVICE_OPTIONS[Session.FILE_DEVICE])) {
             printStatusMessage("Generating postscript file(s) ...\n");
         } else {
-            printStatusMessage("===>>>Launching " + command[0] + "<<<===\n");
+            printStatusMessage("===>>>Launching " + command[0] + " " + command[1] + "<<<===\n");
         }
         ProcessBuilder pb = new ProcessBuilder(command);
-
+        pb.redirectErrorStream(true);
         captureProcessMessage(pb.start());
     }
 
@@ -625,19 +625,12 @@ public abstract class DataProductsApplication extends TrickApplication {
 
             BufferedReader stdInput = new BufferedReader(new InputStreamReader(runtimeProcess.getInputStream()));
 
-            BufferedReader stdError = new BufferedReader(new InputStreamReader(runtimeProcess.getErrorStream()));
-
             String s = null;
 
             // read the output from the command
             while ((s = stdInput.readLine()) != null) {
                 printStatusMessage(s + "\n");
             }
-
-            // read any errors from the attempted command
-            while ((s = stdError.readLine()) != null) {
-                printStatusMessage(s + "\n");
-            }
         } catch (IOException ioe) {
             printStatusMessage(ioe.getMessage() + "\n");
         }