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

Several Drag & Drop methods should be declared to throw HeadlessException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.3.0
    • client-libs
    • beta
    • sparc
    • solaris_2.6



      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)

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: