Need help on how to setup my packages and projects in eclipse
Posted
by jax
on Stack Overflow
See other posts from Stack Overflow
or by jax
Published on 2010-05-29T06:01:10Z
Indexed on
2010/05/29
6:02 UTC
Read the original article
Hit count: 180
java
I am new to Java and am making a license generator. This is my current setup.
com.example.licensegenerator.client (used by the client application)
:LicenseLoader (no Main method)
:LicenseDownloader (no Main method)
com.example.licensegenerator.server.keys (used by the server)
:ProductKeyGenerator(Main method)
com.example.licensegenerator.server.license (used on the server also)
:LicenseGenerator(Main method)
com.example.licensegenerator.lib (Shared classes between client and server)
:Contants (no main)
Now I have a few questions.
Is it OK to have multiple Main() methods in a single project? Will I be able to compile them to different .jar files? (In this case I need two different jars for the server)
Is there a better way to setup the packages?
And a totally unrelated question, with exceptions, is it better to handle them right then and there or throw them and let the main method catch them all (the program cannot recover if an error occurs)
© Stack Overflow or respective owner