Using DataFlavor.javaJVMLocalObjectMimeType to drag-n-drop a java object throws java.lang.IllegalArgumentException: no representation class specified for:application/x-java-jvm-local-object
at java.awt.datatransfer.DataFlavor.initialize(DataFlavor.java, Compiled Code)
at java.awt.datatransfer.DataFlavor.<init>(DataFlavor.java, Compiled Code)
The workaround is to use javaSerializedObject.
The data flavor worked in JDK1.2 - this is a regression from a bug fix introduced in Cricket.
To reproduce the problem:
> cd /home/tinasu/ws/Drag-n-Drop/DnDTestSuite/classes
> java dnd.test.TestJButtonJPanel
> then dnd the button with LocaJavaObject data flavor.