As the title says, I would like to refresh the printers that are registered in the settings of the computer while my Java application is running.
Normally, I can use P
I'm not sure what you were expecting. Here's the output for my Windows Vista laptop running Java 7.
Number of servies found: 3
--> Available Printer 0: Win32 Printer : PamFax
--> Available Printer 1: Win32 Printer : Microsoft XPS Document Writer
--> Available Printer 2: Win32 Printer : CutePDF Writer
x
Number of servies found: 3
--> Available Printer 0: Win32 Printer : PamFax
--> Available Printer 1: Win32 Printer : Microsoft XPS Document Writer
--> Available Printer 2: Win32 Printer : CutePDF Writer
Printer services don't change every 5 minutes, even on a shared network.
Your Java application will have to have to be stopped and started to get the updated list of printers.
I guess I don't understand your environment. In the places I've worked, all of the printers have been defined on the network long before we ever wrote any code. Printer changes were rarely (i mean once a year) made.