import java.awt.*;
import java.awt.print.*;
import javax.print.*;
import javax.print.attribute.*;
class serivc {
static void getAllPrinter(){
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
DocFlavor flavor =DocFlavor.INPUT_STREAM.AUTOSENSE;
String mime =flavor.getMimeType();
PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
for(int i=0;i
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at sun.print.Win32PrintService.getCapabilities(Native Method)
at sun.print.Win32PrintService.(Win32PrintService.java:215)
at sun.print.Win32PrintServiceLookup.getDefaultPrintService(Win32PrintServiceLookup.java:200)
at sun.print.Win32PrintServiceLookup.getPrintServices(Win32PrintServiceLookup.java:61)
at sun.print.Win32PrintServiceLookup.getPrintServices(Win32PrintServiceLookup.java:157)
at javax.print.PrintServiceLookup.getServices(PrintServiceLookup.java:359)
at javax.print.PrintServiceLookup.lookupPrintServices(PrintServiceLookup.java:105)
at serivc.getAllPrinter(serivc.java:18)
at serivc.main(serivc.java:26)
Local Time = Tue Nov 03 09:09:25 2009
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_02-b06 mixed mode)
#
# An error report file has been saved as hs_err_pid3112.log.
# Please refer to the file for further information.
#