I am writing Java applications. I need to be able to redirect the output from my programs to a textfile instead of to the screen.
How do I do this in TextPad? Is it Possible?
The DOS command would be java Hello > output.txt as an example.
Your help would be greatly appreciated.
Surely this must be possible. Also is it possible to redirect straight to the printer?
Thanks in Advance
Gee.
Redirecting output to a text file in Textpad?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
Printing from a command window
I think you might have to snag a printer to use lpt1. To test, try
c:\>echo Hello World > lpt1
If nothing prints, you'll probably need to capture the printer to lpt1. Syntax isn't hard, same as accessing any other network device.
C:\>net use lpt1 \\printServer\printerName
It's been too long since I've printed from the command line but it might need a ctrl-Z after World and before the redirect (>) for echoing data. Unfortunately, I don't have a printer at home so I can't test. At any rate, Slug's got the format right, just copy the file onto lpt1 (once it's mapped) and away it'll go.
c:\>echo Hello World > lpt1
If nothing prints, you'll probably need to capture the printer to lpt1. Syntax isn't hard, same as accessing any other network device.
C:\>net use lpt1 \\printServer\printerName
It's been too long since I've printed from the command line but it might need a ctrl-Z after World and before the redirect (>) for echoing data. Unfortunately, I don't have a printer at home so I can't test. At any rate, Slug's got the format right, just copy the file onto lpt1 (once it's mapped) and away it'll go.
I choose to fight with a sack of angry cats.