-
Bug
-
Resolution: Unresolved
-
P4
-
8u101
-
x86
-
os_x
FULL PRODUCT VERSION :
java version "1.8.0_101"
ADDITIONAL OS VERSION INFORMATION :
macOS Sierra 10.12
A DESCRIPTION OF THE PROBLEM :
When first attempting to print from MATLAB on Sierra, a dialog appears saying
"There are no properly configured printers on the system". After opening the Printers & Scanners panel in System Preferences, MATLAB is now able to find the configured printers.
This is also reproducible using the attached Java code.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac TestPrintServiceLookup.java
java TestPrintServiceLookup
This may be more likely to reproduce immediately after a reboot, before opening the Printers preferences or successfully printing from another application.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
PrintServices found: 1
(or more)
ACTUAL -
PrintServices found: 0
REPRODUCIBILITY :
This bug can be reproduced occasionally.
---------- BEGIN SOURCE ----------
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
public class TestPrintServiceLookup {
public static void main(String[] args) {
PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null,null);
System.out.println("PrintServices found: " + printServices.length);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
After opening the Printers & Scanners panel in System Preferences, MATLAB is now able to find the configured printers.
java version "1.8.0_101"
ADDITIONAL OS VERSION INFORMATION :
macOS Sierra 10.12
A DESCRIPTION OF THE PROBLEM :
When first attempting to print from MATLAB on Sierra, a dialog appears saying
"There are no properly configured printers on the system". After opening the Printers & Scanners panel in System Preferences, MATLAB is now able to find the configured printers.
This is also reproducible using the attached Java code.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac TestPrintServiceLookup.java
java TestPrintServiceLookup
This may be more likely to reproduce immediately after a reboot, before opening the Printers preferences or successfully printing from another application.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
PrintServices found: 1
(or more)
ACTUAL -
PrintServices found: 0
REPRODUCIBILITY :
This bug can be reproduced occasionally.
---------- BEGIN SOURCE ----------
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
public class TestPrintServiceLookup {
public static void main(String[] args) {
PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null,null);
System.out.println("PrintServices found: " + printServices.length);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
After opening the Printers & Scanners panel in System Preferences, MATLAB is now able to find the configured printers.
- relates to
-
JDK-8185571 PrinterJob.lookupPrintServices() fails to detect print services
- Closed