- Joined
- Feb 20, 2007
- Messages
- 1
- Reaction score
- 0
- Points
- 1
I'm trying to get over some specific hurdles in a java swing program.
As a proof-of-concept, I made a jar that accepts files dropped onto the main window. Pretty simple, really. Just implement the DnD interface and you end up with a list of pathnames. Simple.
However, what I want to do is allow the user to drop the files onto the icon of my program and launch the program. Similar to dropping a file onto a printer icon and voila, it starts printing.
I can do this with windows by making a shortcut to "javaw.exe -jar DropTarget.jar", and the file names come in as command line parameters.- the args[] variable in main(String args[]).
This will not be a file type specific to my program- the user might drop in pdfs, text files, various binary files, etc.
Any thoughts?
As a proof-of-concept, I made a jar that accepts files dropped onto the main window. Pretty simple, really. Just implement the DnD interface and you end up with a list of pathnames. Simple.
However, what I want to do is allow the user to drop the files onto the icon of my program and launch the program. Similar to dropping a file onto a printer icon and voila, it starts printing.
I can do this with windows by making a shortcut to "javaw.exe -jar DropTarget.jar", and the file names come in as command line parameters.- the args[] variable in main(String args[]).
This will not be a file type specific to my program- the user might drop in pdfs, text files, various binary files, etc.
Any thoughts?