D
Dan Smithers
Hi,
I have inherited a Java project and would like to introduce a bit more
structure. I am C++ programmer and would like to know what is considered
good practice for Java.
It is compiled on Windows using a batch file that calls
javac -O -g -deprecation *.java
This litters the directories with .class files that are then converted
into a jar with another batch file that contains
zip-r %1.jar . -i \*.class\* \*.gif \*.wav \*jpg \*.png
Currently there is a directory structure
project - contains .java files
com
astra
control - contains .java files
gui - contains .java files
utils - contains .java files
icons - contains .png files
JPEGS - contains .jpg file
All the sub-packages are compiled into one jar.
Is it a good idea to zip sub-packages as separate jars and then link
them together? There are other projects that could use these packages
and it would simplify maintenance.
I would also like to add a build directory to reduce clutter in the
source directory, but when I try it I get a null pointer exception
accessing the icons directories.
I am compiling this as
javac -O -g -deprecation -d build *.java
and running from the project directory using
java -cp build VTASystem
thanks for your help
dan
I have inherited a Java project and would like to introduce a bit more
structure. I am C++ programmer and would like to know what is considered
good practice for Java.
It is compiled on Windows using a batch file that calls
javac -O -g -deprecation *.java
This litters the directories with .class files that are then converted
into a jar with another batch file that contains
zip-r %1.jar . -i \*.class\* \*.gif \*.wav \*jpg \*.png
Currently there is a directory structure
project - contains .java files
com
astra
control - contains .java files
gui - contains .java files
utils - contains .java files
icons - contains .png files
JPEGS - contains .jpg file
All the sub-packages are compiled into one jar.
Is it a good idea to zip sub-packages as separate jars and then link
them together? There are other projects that could use these packages
and it would simplify maintenance.
I would also like to add a build directory to reduce clutter in the
source directory, but when I try it I get a null pointer exception
accessing the icons directories.
I am compiling this as
javac -O -g -deprecation -d build *.java
and running from the project directory using
java -cp build VTASystem
thanks for your help
dan