Forum Stats

  • 3,837,103 Users
  • 2,262,226 Discussions
  • 7,900,204 Comments

Discussions

Drag and drop to desktop icon on Windows

935284
935284 Member Posts: 1
edited May 8, 2012 1:56PM in Java Desktop Applications
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
Tagged:

Answers

  • morgalr
    morgalr Member Posts: 457
    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.
This discussion has been closed.