Hi Swati,
Assuming you have the following setup:
and A.java is defined with:
and B.java is defined with:
use the following commands to compile from the
c:\someDir prompt:
Java assumes the package names follow the directory structure. If you try to compile 'B.java' from within the 'P2' directory it expects to find the 'P1' directory referred to in the 'import' statement within the current directory.
Hope that helps.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform