I am able to detect how to get path of file which is in clipboard, but how can i detect a paste of file, Like If i paste a file/folder in D drive, then java should detect as
D:\\Filename.jpg
I am able to detect how to get path of file which is in clipboard, but how can i detect a paste of file, Like If i paste a file/folder in D drive, then java should detect as
D:\\Filename.jpg
Simple: whenever something gets pasted, you could try to use that string as filename, and see if that works.
As outlined here for example.
In other words: if you find that some string represents a file name, then its a file. If not, then not. That would be to figure if the string denotes an existing file.
Beyond that, you could check if the string could be a valid file name. See here for that option.
And finally, if you are talking about a true file being dropped into a file system folder, then you have to learn how to create a watch service that keeps watching the file system (see here for that).