CSCI 1302 HW 4 Summer 2008 Compiling and running on the Unix command line with Java packages Part 1, step 0: just compile A and B as given. From within H4: javac pkg1/A.java javac pkg1/B.java or javac pkg1/B.java From the parent directory of H4: to compile B successfully, need to change the name of the package to H4.pkg1 in A.java and B.java, then: javac H4/pkg1/B.java To avoid changing the package names, do compile and run from H4. Part 1, step 7: include pkg1. with A in the declaration: public class D extends pkg1.A { To compile D,javac pkg2/D.java works, but javac pkg2.D.java does not. Having compiled pkg2/D.java, either java pkg2/D or java pkg2.D works to run D. Part 2, step 6: the declarations for client2.java need to import pkg1, like this: package pkg3; import pkg1.*;