Bookmark Topic Watch Topic
  • New Topic

Printing text file using Java

 
Ashim Kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 7729
  • Mark post as helpful
  • send pies
  • Report post to moderator
it should print the text file in the printer.

You really mean a printer and not to System.out using System.out.println()?
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic