Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Clipboard paste from native application

2990651Jul 14 2015 — edited Jul 21 2015

I am trying to paste data into Java from a native application, with the intention of modifying it and putting it back into the clipboard.

I have used "ClipView" (from Windows clipboard raw viewer) to verify that the data I require is actually in the clipboard, and can modify the data in ClipView and paste it back into the original application.

ClipView gives the contents as format "50347: CxCellData" and the data is mainly text (although I am not sure how ClipView displays control characters)

When I call getDataTransferFlavors on the contents, it returns an empty array.

I have tried defining a new flavour using the command below, but it doesn't work.

DataFlavor aNewFlavour = new DataFlavor("application/octet-stream", "CxCellData");

How do I create a DataFlavor that links to format "50347: CxCellData"?

Is there anything I need to do to register the flavour?

Note, the application that I am trying to interact with is written in VB (I believe)

Thanks

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 18 2015
Added on Jul 14 2015
1 comment
1,432 views