- 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:
17
mcdp/src/ch/ntb/mcdp/utils/Redirect.java
Normal file
17
mcdp/src/ch/ntb/mcdp/utils/Redirect.java
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user