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

PrinterJob doesnt throw PrinterException when there is no printer in Windows

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 11, 12, 13
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_10

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psadhukhan Prasanta Sadhukhan
                Reporter:
                jdv Jayathirth D V
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: