This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Structuring Projects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Structuring Projects" Watch "Structuring Projects" New topic
Author

Structuring Projects

Johny Doey
Greenhorn

Joined: Feb 17, 2007
Posts: 7
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.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39072
    
  23
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.
Lucas Alberione
Greenhorn

Joined: Aug 15, 2009
Posts: 8
Take a look in here


Lucas
Johny Doey
Greenhorn

Joined: Feb 17, 2007
Posts: 7
Thanks for the JAR pointers, now what about the actual program structure?

Is my attempt OK or should I rethink it?
 
GeeCON Prague 2014
 
subject: Structuring Projects