aspose file tools*
The moose likes Beginning Java and the fly likes System.out and System.err differences? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "System.out and System.err differences?" Watch "System.out and System.err differences?" New topic
Author

System.out and System.err differences?

Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
In another thread, kelvin cheung just asked the following.
Originally posted by kelvin cheung:
hi,
may i ask you whats the difference between : system.out and system.err ?

[ May 06, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
You may want to take a look at the System class documentation to see what it has to say.
In a nutshell, they're just two different output streams. By default, in Windows, both streams direct text output to the system console.
Note that the "destination" of these output streams can be changed by calling System.setOut(PrintStream) and System.setErr(PrintStream). So, a programmer could decide to direct all normal output to the console, or to a text file, while directing all critical errors to a different location, like a special error log file.
Are you getting the idea?
[ May 06, 2004: Message edited by: Dirk Schreckmann ]
kelvin cheung
Ranch Hand

Joined: Mar 27, 2004
Posts: 120
Hi Dirk Schreckmann ,
i think i understand more now... ^^
thanks man ^^ ~~
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: System.out and System.err differences?