2016-10-29 4 views
0

私はドラッグアンドドロップを勉強していますが、私が勉強したいすべての例について、私はfolowing例外java.lang.RuntimeException: cannot load system cursor: CopyDrop.32x32を取得します。誰もがこの例外の意味を知っていますか、どのように修正できますか?このexampleであっても、私はその例外を受け取ります。DragAndDrop java.lang.RuntimeException

java.lang.RuntimeException: cannot load system cursor: CopyDrop.32x32 at sun.awt.windows.WToolkit.lazilyLoadDesktopProperty(Unknown Source) at java.awt.Toolkit.getDesktopProperty(Unknown Source) at java.awt.dnd.DragSource.load(Unknown Source) at java.awt.dnd.DragSource.<clinit>(Unknown Source) at javax.swing.plaf.basic.DragRecognitionSupport.mousePressedImpl(Unknown Source) at javax.swing.plaf.basic.DragRecognitionSupport.mousePressed(Unknown Source) at javax.swing.plaf.basic.BasicListUI$Handler.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.awt.AWTException: Exception: class java.security.PrivilegedActionException null occurred while loading: C:\Program Files\Java\jre1.8.0_101\lib\images\cursors\cursors.properties at java.awt.Cursor.loadSystemCustomCursorProperties(Unknown Source) at java.awt.Cursor.getSystemCustomCursor(Unknown Source) ... 39 more Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError at javax.swing.plaf.basic.DragRecognitionSupport.mousePressedImpl(Unknown Source) at javax.swing.plaf.basic.DragRecognitionSupport.mousePressed(Unknown Source) at javax.swing.plaf.basic.BasicListUI$Handler.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 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(Unknown Source) at java.awt.dnd.DragSource.<clinit>(Unknown Source) ... 35 more

私は、最小限の例を持って、私は同じ例外を取得。

public DragAndDrop() { 
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
    setBounds(100, 100, 450, 300); 
    contentPane = new JPanel(); 
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 
    contentPane.setLayout(new BorderLayout(0, 0)); 
    setContentPane(contentPane); 
    TransferHandler transfer = new TransferHandler("text"); 

    JPanel panel = new JPanel(); 
    contentPane.add(panel, BorderLayout.CENTER); 

    JTextArea textArea = new JTextArea(); 
    textArea.setDragEnabled(true); 
    textArea.setTransferHandler(transfer); 
} 
+0

スタックトレース全体を送信します。 – Narrim

+0

これはJava Swingの質問ですか?あなたはあなたが試したことの最小限の例を入れてもらえますか? –

+0

Googleを検索するこれについて多くのバグレポートがあります。おそらくあなたのOSとJDKのバージョンは関連しているでしょう。 – Gendarme

答えて

0

この問題を解決しました。 jre1.8.0_101がインストールされていて、jre1.8.0_111にアップグレードしました。 DragAndDropに関するこの問題がある場合は、最新バージョンのjreがあることを確認してください。

関連する問題