How can I print out a file to the printer directly using Java on an AS/400?

Joe Sam Shirah

The most basic method is to use System.out.println() and submit the job to batch. As Running Java in a batch job discusses, default handling sends System.err and System.out to a spooled file. The section also mentions methods of redirecting these streams.

If you want to make use of your own printer files rather than the QPRINT/QSYSPRT variety, the Toolbox/JTOpen has several Network print classes that can be used.

Davanum Srinivas also contributed to this answer.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact