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 have encountered the same problem before and after multiple tests, it seems like the printer list is snapshotted at the start of the Java application and can't be refreshed after that using java's lookupPrintServices()
.
What I did to solve that problem is call directly the Winspool API using JNA. If you intend to do so, the Winspool API is well documented by Microsoft : Winspool API documentation
Also, I described a part of my solution to a problem I had a few month ago in this question, it might help you understand JNA and the Winspool API.