A simple setup for small Java development projects could be:
In addition:- Create the source directory ($PROJ_HOME) which will contain all .java files.
- Create the directory $PROJ_HOME/proj_name which will contain all the .class files.
- Add $PROJ_HOME to the CLASSPATH.
- During development, keep a terminal open with working directory $PROJ_HOME, and run "javac *.java -d ." to compile all source files and store the class files in proj_name.
- Run a class from anywhere using java proj_name.ClassName [args].
- Store metadata files etc. required by the code in $PROJ_HOME/meta. If they need to be passed by command line arguments, you can pass $PROJ_HOME/meta/datafile.txt as an argument wherever you are running the class.
- Store sample test data files to quickly test the code in $PROJ_HOME/test.
No comments:
Post a Comment