我正在寻找获得已安装打印机列表的可能性.我正在使用带有Windows操作系统的JDK 1.6.有谁知道解决方案?
先感谢您.
只是想添加一个小片段:
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()); } }