PrintServiceLookup.lookupPrintServices fails to list new printers until re-start (JDK1.4.2_03, Linux

C

Carlos Oliva

Hi Forum,
How could I get
javax.print.PrintServiceLookup.lookupPrintServices(null,null) to return the
current available services while the program that uses lookupPrintServices
is running? In a tomcat servlet I use the lookupPrintServices(..) to get a
list of the printer services available. The class works well and returns the
list but if I install a new printer, the servlet does not list the newly
installed service until I restart Tomcat. Is there a way to unload and
reload the PrintServiceLookup class and then call
PrintServiceLookup.lookupPrintServices?

It appears that the lookupPrintServices(..) returns the list of services
that was available when the instance of the virtual machine was started.
Hence, while the instance is running, it allways returns the same list of
services. If I run a program that lists the services and then exits, the
program lists the newly added printer on re-run. But if the program never
exits (it runs in a loop, re-listing the services every so often), and I add
a new printer while the program is running, the newly added printer is not
listed until I terminate teh rpogram and re-start it.

Thanks in advance for your responser
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top