• 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

Structuring Projects

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess this should go into the beginner's section :s

Basically, I've completely forgotten how I should be structuring projects. I've just started a new one, as I was setting it all up, I realised I had no idea what to do anymore. Haven't coded Java in a long time. FYI, I'm working with NetBeans.

The app itself is simple and relies on three other programs to do the work (it just unifies them under one roof for personal convenience). At first it's just going to be a command line tool, but eventually I'll add an interface (as much as I do hate them, they can be useful).
So I want to structure it so it's no problem adding another source package to create the interface. This shouldn't be a problem, but I'm likely to just spaz on the keyboard and break the Internet somehow. Anyway, so I've created three Java Package in the source package of my project - one each for the different external applications.
Once they work individually, I want to create a Java Class in a separate package to actually unify them all.

I don't know whether you can do this, but I'd like to create a jar file for it. I've seen jar files used for GUI applications, but never for a command line application. Obviously, I'd still need to be able to pass various switches, as well as write files externally (an ini for settings for instance). Link to a good guide or such of creating one?

Then whenever I feel like messing with swing again, I'll add a package with GUI elements.

Any and all pointers appreciated, cheers.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, if you use NetBeans you can get it to create a .jar for you. Otherwise have a look in the Java™ Tutorials; there is a bit about jars in the "deployment" section.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look in here
 
Johny Doey
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the JAR pointers, now what about the actual program structure?

Is my attempt OK or should I rethink it?
 
reply
    Bookmark Topic Watch Topic
  • New Topic