Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2176462 | 5.0u19 | Vladislav Karnaukhov | P3 | Closed | Fixed | b02 |
JDK-2160388 | 5.0u18-rev | Vladislav Karnaukhov | P2 | Resolved | Fixed | b05 |
java version "1.4.1-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b19)
Java HotSpot(TM) Client VM (build 1.4.1-rc-b19, mixed mode)
When invoke method lookupPrintServices() on class PrinterJob or PrintServiceLookup, the printers list can not refreshed when adding or deleting printers dynamically.
Steps to follow to reproduce the problem:
1. Compile and run the included test case
2. The print dialog shows up and avaible printers information is printed out on screen. Click "cancel" to dismiss the dialog. The test case is pending.
3. Use Printer Selector Tool to add a new printer into selected printers list and save changes.
4. Back to the terminal that run the test case an click "enter" button to continue. Then a new thread will be created to invoke the lookupPrintServices() and pop up the print dialog again.
5. The screen output shows that invoking lookupPrintServices() doesn't reflect the newly added printer information, neither does the print dialog.
//-------- source code begin-----------//
import java.awt.print.*;
import javax.print.*;
public class MTPrinterTest extends Thread {
public static void main(String[] args) {
MTPrinterTest t1 = new MTPrinterTest();
t1.start();
try {
System.in.read();
} catch (Exception e){}
MTPrinterTest t2 = new MTPrinterTest();
t2.start();
}
public void run() {
PrinterJob printerJob;
PrintService[] printServices;
printerJob = PrinterJob.getPrinterJob();
printServices = printerJob.lookupPrintServices();
System.out.println("Number of servies found: " + printServices.length);
for (int i =0; i< printServices.length; i++)
System.out.println("--> Available Printer " + i + ": " + printServices[i]);
printerJob.printDialog();
}
}
//-------- source code end ----------//
- backported by
-
JDK-2160388 RFE: lookupPrintServices() to refresh the printers list dynamically
- Resolved
-
JDK-2176462 RFE: lookupPrintServices() to refresh the printers list dynamically
- Closed
- duplicates
-
JDK-6289652 Bug 4744405 committed to be fixed in 1.6 needs to be fixed in 1.5.0_06
- Closed
-
JDK-5028849 Print queue problem
- Closed
-
JDK-6182986 Default printer lookup doesn't track changes to the default printer
- Closed
- relates to
-
JDK-8153732 Windows remote printer changes do not reflect in lookupPrintServices()
- Resolved
-
JDK-6835077 Headless_BAT fail with crash on jdk 1.5.0_18 on RHEL 4 on x86
- Closed