| Author |
To where is standard output being written?
|
d jones
Ranch Hand
Joined: Mar 13, 2006
Posts: 76
|
|
Is it possible to determine where java is writing its standard output? If we start a program with "java testProgram > logfile.log" Is it possible to identify in the program that it is writing its standard output to a file called logfile.log? Many Thanks
|
 |
Peter Chase
Ranch Hand
Joined: Oct 30, 2001
Posts: 1970
|
|
No, not with Pure Java anyway. The redirection is being done by the operating system, so Java does not know about it. If it was really, really important to you, it might be possible to find out, using either native code (JNI) or external processes (Runtime.exec()). Neither approach is portable or attractive. Why do you want this information?
|
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
|
 |
 |
|
|
subject: To where is standard output being written?
|
|
|