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

JPS documentation example PrintPS doesn't compile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • docs
    • beta2
    • x86
    • windows_98



      Name: bsC130419 Date: 06/12/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      In the alpha draft "Java Print Service User Guide", the example PrintPS.java
      (page 43 of the document) is buged. It doesn't compile due to a little error in
      the listing at this lines (40 and 41):

      pj.addPrintJobListener(this);
      pservices[0].addPrintServiceAttributeListener(this);
      The compilation gives:

      PrintPS.java:30: addPrintJobListener(javax.print.event.PrintJobListener) in
      javax.print.DocPrintJob cannot be applied to (PrintPS)
      pj.addPrintJobListener(this);
        ^
      [loading C:\JDK1.4\JRE\lib\rt.jar
      (javax/print/event/PrintServiceAttributeListener.class)]
      PrintPS.java:31: addPrintServiceAttributeListener
      (javax.print.event.PrintServiceAttributeListener) in javax.print.PrintService
      cannot be applied to (PrintPS)
      pservices[0].addPrintServiceAttributeListener(this);
      (Review ID: 126348)
      ======================================================================

            jballsunw Jennifer Ball (Inactive)
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: