开发者

How to get port name of printer?

I use javax.print.PrintService to look up printer services on local machine. Here is code to get printers:

PrintService[] services = PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);

Can i al开发者_JS百科so get port name of printer (USB001, COM, LPT..) in java?


You just can't do it with pure Java code (i.e., without using JNI (native code)).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜