0
我正在使用PrintService类来获取当前连接的打印机的详细信息,现在我需要获取所连接打印机的IP。需要获取IP信息
我能够获得所有连接的打印机的名称,但无法获得IP。
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());
System.out.println("Printer: " + printer.getName());
}
有人可以让我知道如何获得打印机的IP?
这不工作coz打印机没有配置主机名......任何其他方式做呢?使用printservice类 – user609745 2011-03-04 13:15:33