I have a simple, simple and possibly stupid question, but how can I implement this, can I drag the file into my java program and open it? I have been looking for this basic question for a very long time .....
As long as I found out, you cannot implement dragging it onto .jar because it is not executable. You have to create a .exe that will also open your .jar, but that’s it! I would really like to know how :)
A keyword will be enough if I can get an answer by searching for that keyword.
Thanks Leander
// Editing: Perhaps I complicated the situation a bit. Later, I want to have a shortcut on, for example, on the desktop, where I can drag any file to the shortcut, and the program will open with the file (it will be at that moment) only move it to a special place.
I don’t know what the code for this will look like, I don’t even know how to do it for Google (I have questions about how to implement "open with" with the answer Desktop.open (File f)).
source share