• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Simple runnable framework

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got some classes that I need to be able to run in various fashions (command line, Automize tool, who-knows-what-in-the-future). I'm going to extend off of an abstract class that will set values based on command line parameters:
java.exe com.acme.myclass -file stuff.txt -date 05/12/2004
will call setFile(stuff.txt) and setDate(05/12/2004).
Rather than spending the afternoon writing this, I was wondering if there was any source around that would do this. If there is, I'm sure it's got features that would be useful, that I hadn't considered yet.
Rick DeBay
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're referring to the command line argument portion, yes. Apache has a project aimed at just this sort of thing. It's the Jakarta Commons CLI project.
 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I'll take a look at it.
I take it as a given that anything I'm smart enough to think of, someone has already coded.
If it's too heavy-weight, I'm sure someone in their community can point me to the right place.
 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll probably end up using Jakarta Common's BeanUtil.copyProperty. I may check out the code to CLI and see if I can integrate something like that.
 
reply
    Bookmark Topic Watch Topic
  • New Topic