wood burning stoves 2.0*
The moose likes Java in General and the fly likes Printing text file using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Printing text file using Java

Ashim Kumar
Greenhorn

Joined: Mar 13, 2003
Posts: 6
I need to print a text file (say e.g 'bar.txt') from a Java Source Code. Let's say I specify the name of the text file (e.g. 'bar.txt') in my Java Source Code and when I run the Java Code, it should print the text file in the printer. Can anybody tell me, what I need to do? Please specify a block of Code if possible...
Thanks.
Cheers!
Ash :roll:
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
it should print the text file in the printer.

You really mean a printer and not to System.out using System.out.println()?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Greetings Ash,
Welcome to JavaRanch the absolute best site on the www for Java information. Please do not post the same topic in multiple forums. I am closing this and referring respondants to here.


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
Don't get me started about those stupid light bulbs.
 
subject: Printing text file using Java
 
Similar Threads
Printing text file using Java
Accessing file inside JAR
Source not found
How to access a file from with a jar file?
Printing directly to printer