I am trying to write some code that will allow the user to select a file in a java application and then be copied to the system clipboard for them to paste into a folder in the Windows Explorer. Currently when I try this, the path of where the file exists is copied. I go to the Explorer and try to paste, but the Paste option is not enabled. I am using the following code to copy the file to the clipboard:
Is it possible to transfer a file from Java and have it recognized by the system? If so, will you point me to documentation/example of how it can be done. Thanks.
I appreciate the response. I can currently copy/paste a string, but would like to know if it is possible to paste a "file handle" from java, such that Windows would recognize it as a file and not as text. Currently, I have been unsuccessful at finding a solution. Steve
Although I don't know the answer to your question, I wanted to point out that such an action is probably very dependant on the specific platform where it runs (Windows in this case). This seems to go against the platform-independant philosophy that drives Java development. I am sure that you could do this in C with the Windows API, but it seems to be somewhat contrary to the typical mindset of a Java programmer. With that said, perhaps you can still find a way to do it. I wish you luck in your continued search. Layne