If I run the attached program, click "Copy", run OpenOffice 3.3 Writer, and choose "Edit|Paste" from the Writer's main menu, the Writer displays the message "Requested clipboard format is not available". At the same time, the test program generates the following exception in stderr:
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:165)
at java.nio.ByteBuffer.put(ByteBuffer.java:813)
at com.sun.glass.ui.win.WinSystemClipboard.fosSerialize(WinSystemClipboard.java:59)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$1$1.run(WinApplication.java:49)
at java.lang.Thread.run(Thread.java:662)
Note that not any content results in this error. If I try to Clipboard.place a simpler string such as "<b>Test</b>", the problem does not occur.
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:165)
at java.nio.ByteBuffer.put(ByteBuffer.java:813)
at com.sun.glass.ui.win.WinSystemClipboard.fosSerialize(WinSystemClipboard.java:59)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$1$1.run(WinApplication.java:49)
at java.lang.Thread.run(Thread.java:662)
Note that not any content results in this error. If I try to Clipboard.place a simpler string such as "<b>Test</b>", the problem does not occur.