Abimaran Kugathasan wrote:Oh, your problem is, why does the compiler compile class B even though you haven't explicitly compiled the Class B before Class A? Correct?
Right. And how does it find out which file to compile in order to generate class B ? It must be going through this entire process when it encounters a reference to class B in A.java and doesn't find B.class in the classpath. In fact, why doesn't it just stop here when it can't find class B in the classpath, like it usually does and throw a compile-time error? Why compile B.java ?
Campbell Ritchie wrote:Obviously what confused me about the initial / is that I usually use *nix where an initial / will take you to the root of the drive. The syntax of the / must be different here.
I am really sorry !! I forgot to include ~ before /pkg to denote my current directory which is the home directory. But I made the typing error on this forum only. On the terminal I typed without the / which is equivalent to ~/ in my case. I totally missed it. Sorry again. I am using Linux too.