diff --git a/src/org/ohdsi/utilities/RabbitInAHatLauncher.java b/src/org/ohdsi/utilities/RabbitInAHatLauncher.java index 4ac63d78..f18fd4d7 100644 --- a/src/org/ohdsi/utilities/RabbitInAHatLauncher.java +++ b/src/org/ohdsi/utilities/RabbitInAHatLauncher.java @@ -3,6 +3,7 @@ import org.ohdsi.rabbitInAHat.RabbitInAHatMain; import java.util.Arrays; +import java.io.File; import java.util.ArrayList; /* Adapted from code found on: @@ -25,6 +26,8 @@ public static void main(String[] args) throws Exception { command.addAll(Arrays.asList("java", "-Xmx" + MIN_HEAP + "m", "-classpath", pathToJar, "org.ohdsi.rabbitInAHat.RabbitInAHatMain")); command.addAll(Arrays.asList(args)); ProcessBuilder pb = new ProcessBuilder(command); + pb.inheritIO(); + pb.redirectError(new File("ErrorStream.txt")); pb.start(); } } diff --git a/src/org/ohdsi/utilities/WhiteRabbitLauncher.java b/src/org/ohdsi/utilities/WhiteRabbitLauncher.java index ce68c27b..05ecdf82 100644 --- a/src/org/ohdsi/utilities/WhiteRabbitLauncher.java +++ b/src/org/ohdsi/utilities/WhiteRabbitLauncher.java @@ -1,5 +1,7 @@ package org.ohdsi.utilities; +import java.io.File; + import org.ohdsi.whiteRabbit.WhiteRabbitMain; /* Adapted from code found on: @@ -19,6 +21,8 @@ public static void main(String[] args) throws Exception { System.out.println("Starting new VM"); String pathToJar = WhiteRabbitMain.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath(); ProcessBuilder pb = new ProcessBuilder("java", "-Xmx" + MIN_HEAP + "m", "-classpath", pathToJar, "org.ohdsi.whiteRabbit.WhiteRabbitMain"); + pb.inheritIO(); + pb.redirectError(new File("ErrorStream.txt")); pb.start(); } }