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

getPrintJob() giving a NullPointerException on Unix (1.1.x only)

    Details

    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      solaris_2.5.1, solaris_2.6, solaris_7, windows_nt

      Description



      Name: joT67522 Date: 11/18/97


      I have the following piece of code which works very
      well on a Windows NT platform, but throws a
      NullPointerException on a Unix platform (I tried
      them on Solaric and SGI) :

      ...
         private static printPreferences_ = new Properties();
      ...
         Toolkit toolkit = this.getToolkit();
         PrintJob job = toolkit.getPrintJob( this,
                                             "test",
                                             printPreferences_ );

      The line "PrintJob job = ..." encounters the
      following error on a Unix platform :

      java.lang.NullPointerException
              at sun.awt.motif.UPrintDialog.<init>(UPrintDialog.java:172)
              at sun.awt.motif.PSPrintControl.<init>(PSPrintControl.java:108)
              at sun.awt.motif.MToolkit.getPrintJob(MToolkit.java:257)
              at testPrint.<init>(testPrint.java:14)
              at testPrint.main(testPrint.java:22)

      Any ideas why or do any workaround suggestions?

      Thanks in advance,
      Fionna
      (Review ID: 19750)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              mmartaksunw Michael Martak (Inactive)
              Reporter:
              johsunw Joon Oh (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: