Link to home
Start Free TrialLog in
Avatar of Ikelca
IkelcaFlag for Canada

asked on

how to list and map network printer in Active Directory using java

hi,

is that possible to list network printers in AD and connect it to local machine when a button clicked?
I am wondering if this could be done in java. and if yes, can you please give me some ideas?

thanks
Avatar of for_yan
for_yan
Flag of United States of America image

You can use Runtime.getRuntime.exec("net  view \\\\print_server_name");
ASKER CERTIFIED SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ikelca

ASKER

it seems that link has no answers either, net view or net use commands are OS dependent.  
im wondering if there is any API that we can use.


Java printing API does have a part which is called Printer discovery - maybe it will help:
http://java.sun.com/products/java-media/2D/forDevelopers/sdk12print.html

Stiil, I think in this API it will discover only local printer
Avatar of Ikelca

ASKER

so i guess there is no way to implement this idea in java ?
Well, never say never, maybe someone will still come up with some idea
Probably, for now if you just check the system and do some system specific discovery - maybe it is more practical
Avatar of Ikelca

ASKER

it seems only you and me here lol~~
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ikelca

ASKER

cant find working solution, decided to go with c# instead of java