Hey everyone...

I want to thank everyone for the help...

The below piece of code works great...thanks stefan



----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------




                                                                                       
                                                
                      Stefan Carlsson                                                  
                                                
                      <stefan.carlsson         To:      "jdjlist" <[EMAIL PROTECTED]>  
                                      
                      @fgis.net>               cc:                                     
                                                
                                               Subject: [jdjlist] Re: Windows Printing 
- Problem solved...                             
                      05/30/2003 04:54                                                 
                                                
                      AM                                                               
                                                
                      Please respond                                                   
                                                
                      to "jdjlist"                                                     
                                                
                                                                                       
                                                
                                                                                       
                                                





Hi Jason !

At a second thought perhaps I should have changed the header in
my response mail, so you don't have to go through all the other
solutions first... (even if you perhaps should when you get some
spare time...). Anyway, now I have... and added some to the code.

Also attached the picture I used to try it out...

One solution is to use mspaint.exe to make the printing in the
background... :)

Hope it helps !

Regards
Stefan
-----------------

import java.io.IOException;

public class Print {
    private final Object lock = new Object();
    private String command = "C:\\WINNT\\SYSTEM32\\mspaint.exe /p
c:\\MSvsSUN.jpg";

    public Print() {
        synchronized (lock) {
            try {
                Process p;
                (p = Runtime.getRuntime().exec(command)).waitFor();
            } catch (InterruptedException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    public static void main(String[] args) {
        new Print();
    }
}



---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

<< Attachment Removed : MSvsSUN.jpg >>





---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

Reply via email to