Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Discover Network Printers

 
John McDonald
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello JGuru,
I would like to use Java to discover network printers that are not added into the box that I run my code on. Could someone give some hint or sample how to do so? Thanks.

John
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you can do this with the Java Print Service. It queries the machine the JVM is running on to see what printers that machine knows about, not what may all be avaliable to it through the network.
 
John McDonald
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul,
But I have printer name and port of the printer, can I monitor status of that printer, given that the box the java code running on does not know about that printer?

John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic