Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
System.setOut() - Setting Standard Console Output to
How could Java classes direct program messages to the system console, but error messages, say to a file?
✍: FYIcenter
The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both connected to the system console. But you can change them to files as shown in the this example:
Stream st = new Stream(new
FileOutputStream("output.txt"));
System.setOut(st);
2007-03-03, 8815👍, 0💬
Popular Posts:
How To Create an Add-to-Netvibes Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...
What Happens to Your Transactions When ERROR 1213 Occurred? - MySQL FAQs - Transaction Management: C...
How To Use Subqueries in the FROM clause? - MySQL FAQs - SQL SELECT Statements with JOIN and Subquer...
How To Use "IN OUT" Parameter Properly? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and F...
What are some advantages and disadvantages of Java Sockets? Advantages of Java Sockets: Sockets are ...