2. Development Rules
• *Prepare* your workspace/project
– Window -> Preferences -> Java -> Code Style
• Clean up
• Formatter
• Code templates
– At least two source folders in Java project
• src/main/java
• src/test/java
– Output folder
• target
3. Development Rules (contd.)
• Format/Clean up the code regularly
– Right click -> Source -> Clean up
• Entire project or just one file
– Ctrl + Shift + F (format code)
• PMD/ Style Check regularly
– Right Click -> PMD -> Check code with PMD
– Right Click -> Check Style -> Check code with
Check Style
4. Development Rules (contd.)
• Java coding
– Always use packages
– One class / file
– Never use System.out.print* methods
• Junit
– Test class for every class
• Check-in regularly
– Don’t wait for coding to get over
5. Useful commands
• To make jar files
– jar cvf <jar file>.jar –C target/
com/evolvus/training/anisht/<*.class>
– jar cvf <jar file>.jar –C target/ .
• To generate javadoc for package
– javadoc –d html –sourcepath srcmainjava
com.evolus.training.anisht