-
Bug
-
Resolution: Fixed
-
P2
-
1.3.0
-
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)
--------------------------------------------------
======================================================================
- relates to
-
JDK-4398623 doc bug: DragSource cursors are null in headless mode; should be documented
- Resolved