File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 3293
    
    7
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