代码工作打印机安装本地不工作的打印机共享或打印机服务器。 请帮助,我想让所有打印机连接。 谢谢大家。
import javax.print.*;
class Test {
public static void main (String [] args)
{
PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);
System.out.println("Number of print services: " + printServices.length);
for (PrintService printer : printServices)
System.out.println("Printer: " + printer.getName());
}
}