After compiling Animal you should end up with a directory "A" under the current directory and "Animal.class" in that. The classpath when compiling "Bird" should just include the current directory (not "A" or "A.Animal"). After compiling "Bird" there should be a "Bird.class" in the current directory.
You are correct to use javac -d . Animal.java, which seems to work when I use Windows. Try deleting the Animal.java file after you have compiled it into "A". I did. It worked (on Linux). No idea why you are getting this error.
Try Keith Lynn's suggestion and put Animal in directory A and back. Note you have to compile Animal from a command prompt in A before you can try compiling Bird from a command line in C:\jdk\bin\corejava.
BTW: You oughtn't to be keeping your exercises in a jdk\bin folder. Make yourself a "JavaPrograms" folder in MyDocuments or C drive or somewhere, so as to avoid confusion with the jdk files.
Joined: Feb 08, 2006
Thanks....Thanks...Thanks all of you. Finally my program is running.