The easiest way is to save to a temporary file, do

Process p =  Runtime.exec("lpr "+myfilename);
p.waitFor();

... then delete the file.

New Java wrote:
> 
> Hi, there,
> 
> What I want to do is:
> When the following code running,
> print "try to be printed" to my default printer, NOT
> my screen. Could you help me on it?
> 
> Thanks!! (Sorry for the basic stupid question)
> 
> David
> 
> *******************************************
> 
> public static void main (String args[]) {
>    str_mystring = "try to be printed"
> 
> }
> 
> *******************************************
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

-- 
Joseph Shraibman
[EMAIL PROTECTED]
Increase signal to noise ratio.  http://www.targabot.com


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to