Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224961

PrinterJob doesnt throw PrinterException when there is no printer in Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • 11, 12, 13
    • client-libs
    • None
    • x86
    • windows_10

      If we run test/jdk/java/awt/print/PrinterJob/LandscapeStackOverflow.java
      in Windows 10 where no printer servies are present it doesnt throw Printer exception. In case of Mac and Ubuntu it throws printer exception.

      In case of Windows test timeout.

      Ubuntu :
      java.awt.print.PrinterException: No print service found.
      at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1512)
      at LandscapeStackOverflow.main(LandscapeStackOverflow.java:54)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:830)

      Mac :
      java.awt.print.PrinterException: No print service found.
      at java.desktop/sun.lwawt.macosx.CPrinterJob.print(CPrinterJob.java:265)
      at LandscapeStackOverflow.main(LandscapeStackOverflow.java:54)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:830)

            psadhukhan Prasanta Sadhukhan
            jdv Jayathirth D V
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: