• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Drag and Drop

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All right, I have a problem and I'm not sure if this belongs in the Intermediate or the Beginner forum, but I'll put it here.
I'm writing a Java program that has to take in a tab delimited file, order it, then spit out a postscript file and a ups file.
The problem I have is that my boss would love to simply drag the file onto the Java app I write and away the Java app goes.
I'm wondering if the Drap and Drop classes and subclasses for the java.awt would work, or is that just for inside the program? Does anyone have any ideas how I would go about getting a drag and drop to work like I described?
Thank you,
Jax
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jax -
That sounds like a Macintosh-specific kind of operation, although I haven't used one in a while.
The idea's a nice one, and it could probably be written in any language, but you need a windowing system to provide that feature to begin with.
 
Jax Laakso
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it's a Mac specific function as well, and our shop runs Macs so he's used to being able to do it.
The Java app won't do it automatically because I've written another application and when I tried it just to see if it was something Mac would just do, it didn't work. So I'm wondering where I can start, or if I'm going to have to break down and use a GUI for the program.
Jax
 
Michael Ernest
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is possible to making an executable JAR. In the JAR file you need a class with a main(), along with a manifest file that lists it, like this:
Main-Class: Bootstrap.class
You'd execute this on the command line with:
java -jar codestuff.jar
IF MacOS can be made to recognize an executable jar and take a dropped file as a "command-line argument," you're in business!
 
I wasn't selected to go to mars. This tiny ad got in ahead of me:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic