Forum Stats

  • 3,838,020 Users
  • 2,262,321 Discussions


Clipboard paste from native application

2990651 Member Posts: 2
edited Jul 21, 2015 12:29PM in Java Desktop Applications

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)



  • morgalr
    morgalr Member Posts: 457
    edited Jul 21, 2015 12:29PM

    I know this is going to sound strange, but you have not stated it--can you paste the mentioned data into any Windows based application that currently exists? If you have not tried to paste it, say into MS Word, using the paste option that exist in the windows app, then you should do that before continuing any further. In my years of development, I cannot begin to tell you how many times we've had problems because what we were trying to do was impossible because the input requirements, which were "verified" as being ready, had not been met.

This discussion has been closed.