This discussion is archived
1 Reply Latest reply: May 8, 2012 10:56 AM by morgalr RSS

Drag and drop to desktop icon on Windows

935284 Newbie
Currently Being Moderated
My Java application is bundled in a JAR (with a MAIN). On Windows (XP, Server 03+ and Windows 7) I would like to have it so the user can drag and drop files and/or folders onto the JAR's icon on the desktop and have it launch its MAIN passing in a list of java.io.File objects representing the dropped item(s).

Is this possible? Do I need to turn my JAR into an EXE and if so can someone recommend an EXE generator tool that supports this drag-n-drop functionality?

TIA,

-Noah
  • 1. Re: Drag and drop to desktop icon on Windows
    morgalr Explorer
    Currently Being Moderated
    NBW-Java wrote:
    My Java application is bundled in a JAR (with a MAIN). On Windows (XP, Server 03+ and Windows 7) I would like to have it so the user can drag and drop files and/or folders onto the JAR's icon on the desktop and have it launch its MAIN passing in a list of java.io.File objects representing the dropped item(s).

    Is this possible? Do I need to turn my JAR into an EXE and if so can someone recommend an EXE generator tool that supports this drag-n-drop functionality?
    Noah,
    I've not ever seen another application that would do that without having the application already running, once it is running then you should be able to do a drag and drop.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points