- Stdout and Stderr redirection to file (for BlackBox-Support)

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@49 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2005-11-17 10:14:47 +00:00
parent aa0345de57
commit 090233e957

View File

@@ -0,0 +1,17 @@
package ch.ntb.mcdp.utils;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
public class Redirect {
public static void redirect(){
try {
System.setOut(new PrintStream(new FileOutputStream("JavaOut.txt")));
System.setErr(new PrintStream(new FileOutputStream("JavaErr.txt")));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}