This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Redirect output to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Redirect output to a file" Watch "Redirect output to a file" New topic
Author

Redirect output to a file

Aru Ven
Ranch Hand

Joined: Sep 28, 2000
Posts: 199
Hi ,
Can anyone tell me how to redirect the output of the program to a text file...
Thx,
ARuna
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3253
    
    2
java YourProgram > output.txt
HTH,
Paul.

------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
Aru Ven
Ranch Hand

Joined: Sep 28, 2000
Posts: 199
Thx Anil, that helped....
Aruna
Rob Whelan
Ranch Hand

Joined: Oct 18, 2000
Posts: 33
If you want a system independant method, do it from within your program:
From within your main method:

[This message has been edited by Rob Whelan (edited October 20, 2000).]
[This message has been edited by Rob Whelan (edited October 20, 2000).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Redirect output to a file
 
Similar Threads
Eclipse / MyEclipse - Logging console output ?
javaw.exe -jar = doesn't work BUT java.exe -jar = works ?
output redirect??
sql server logs
how the the same operation with "pipe"...