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

PIT: access problem to a PrinterJob on OS X

XMLWordPrintable

    • 2d
    • b08
    • x86_64
    • os_x

        We have apparently some security by-product bug on Mac.
        Run this simple code with b06 PIT build of jdk9:

        import java.awt.print.*;
        public class PriJo {
            public static void main(String args[]) {
                PrinterJob pj = PrinterJob.getPrinterJob();
                PageFormat pf = pj.pageDialog(new PageFormat());
            }
        }

        It will fail with
        Exception in thread "main" java.awt.AWTError: Could not access PrinterJob: sun.lwawt.macosx.CPrinterJob
        at java.awt.print.PrinterJob$1.run(PrinterJob.java:88)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.print.PrinterJob.getPrinterJob(PrinterJob.java:77)
        at PriJo.main(PriJo.java:4)

        It's new issue in this PIT only. Could it be a stopper?

              pchelko Petr Pchelko (Inactive)
              yan Yuri Nesterenko
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: