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

Several Drag & Drop methods should be declared to throw HeadlessException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.4.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description



      Name: sdR10048 Date: 11/08/2000


      java.awt.dnd.DragSource() throws unexpected HeadlessException in
      headless mode.
      Javadoc (build 1.4beta-B35) says:

      public DragSource()

           Construct a new DragSource.

      Test.java demonstrating the bug:
      --------------------------------------------------
      public class Test {
          public static void main(String[] args) {
              new java.awt.dnd.DragSource();
          };
      }

      Output:
      --------------------------------------------------
      > java -djava.awt.headless=true Test
      java.awt.HeadlessException
              at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:115)
              at java.awt.Cursor.getSystemCustomCursor(Cursor.java:219)
              at sun.awt.motif.MToolkit.lazilyLoadDesktopProperty(MToolkit.java:466)
              at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1340)
              at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1329)
              at java.awt.dnd.DragSource.load(DragSource.java:113)
              at java.awt.dnd.DragSource.<clinit>(DragSource.java:126)
              at Test.main(Test.java:3)
      Exception in thread "main" java.lang.ExceptionInInitializerError: java.lang.RuntimeException: failed to load system cursor: DnD.Cursor.CopyDrop : null
              at java.awt.dnd.DragSource.load(DragSource.java:117)
              at java.awt.dnd.DragSource.<clinit>(DragSource.java:126)
              at Test.main(Test.java:3)

      --------------------------------------------------
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dmendenhsunw David Mendenhall (Inactive)
                Reporter:
                dsvsunw Dsv Dsv (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: