Hi,
I have a problem with java 7 programs running on opensuse 12.3 machines.
The following simple java program
import java.awt.dnd.DragSource;
public class TestCursor
{
public static void main(String] args)
{
System.out.println(DragSource.isDragImageSupported());
}
}
fails to run with the following exception:
# java TestCursor
java.lang.RuntimeException: cannot load system cursor: CopyDrop.32x32
at sun.awt.X11.XToolkit.lazilyLoadDesktopProperty(XToolkit.java:1523)
at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1804)
at java.awt.dnd.DragSource.load(DragSource.java:131)
at java.awt.dnd.DragSource.<clinit>(DragSource.java:147)
at TestCursor.main(TestCursor.java:7)
Caused by: java.awt.AWTException: Exception: class java.lang.IllegalArgumentException Width (0) and height (0) must be non-zero occurred while creating cursor CopyDrop.32x32
at java.awt.Cursor.getSystemCustomCursor(Cursor.java:362)
at sun.awt.X11.XToolkit.lazilyLoadDesktopProperty(XToolkit.java:1521)
... 4 more
Exception in thread "main" java.lang.ExceptionInInitializerError
at TestCursor.main(TestCursor.java:7)
Caused by: java.lang.RuntimeException: failed to load system cursor: DnD.Cursor.CopyDrop : cannot load system cursor: CopyDrop.32x32
at java.awt.dnd.DragSource.load(DragSource.java:135)
at java.awt.dnd.DragSource.<clinit>(DragSource.java:147)
... 1 more
I have installed the machine with default opensuse settings. All updates are installed too.
It doesn’t matter if I use KDE or GNOME.
It doesn’t matter if I use openJDK or Oracle JDK.
I also tested different versions of the Oracle JDK (1.7.0_11, 1.7.0_25). All versions have the same problem.
But: The java program is running fine on an opensuse 12.3 installation in the VirtualBox on my windows PC.
Any ideas how to fix this problem?
Thanks!
Uli
P.S.: This is a real problem! For example jvisualvm provided with Oracle JDKs also fails with this problem. And other java software tools have the same problem.