Skip to content

Commit

Permalink
Writing error stream of new VM to file for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
schuemie committed Mar 14, 2019
1 parent 28f4e76 commit 28c7ff6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/ohdsi/usagi/Launcher.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.ohdsi.usagi;

import java.io.File;

import org.ohdsi.usagi.ui.UsagiMain;

public class Launcher {
Expand All @@ -16,6 +18,8 @@ public static void main(String[] args) throws Exception {
System.out.println("Starting new VM");
String pathToJar = UsagiMain.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath();
ProcessBuilder pb = new ProcessBuilder("java", "-Xmx" + MIN_HEAP + "m", "-classpath", pathToJar, "org.ohdsi.usagi.ui.UsagiMain");
pb.inheritIO();
pb.redirectError(new File("ErrorStream.txt"));
pb.start();
}
}
Expand Down

0 comments on commit 28c7ff6

Please sign in to comment.