Determining the destination of a PrintStream
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Fogarty
Posted On:   Monday, October 4, 2004 10:28 PM


When a static main() is started, how can I determine
what the System.out PrintStream is attached to?
I need to know if it is an actual console (for example
a unix or windows shell), invoked from ant, eclipse,
netbeans, or from MS Windows where System.out is not
attached to anything seful, and I need to redirect it.

Thanks - JF

Re: Determining the destination of a PrintStream

Posted By:   Stephen_Ostermiller  
Posted On:   Tuesday, October 5, 2004 04:29 AM

There is no way that I know of to determine that. I would recommend a command line argument that tells you where to put the output (eg, "-" for System.out, or a filename)
About | Sitemap | Contact