Aha! I logged a bug against this with Sun, and they accepted it IIRC only to tell me I was (basically) being annoying (and I kind of see their point) - IIRC (I’ll need to check what happened, actually).
My bug/RFE basically goes:
"sourcepath is one of the worst named flags ever: it doesn’t mean what it says, it actually means something different.
Worse, the documentation that comes with java 1.4.x provides a description that is incorrect - it describes something different to what is implemented because it omits a crucial sub-clause.
Please either change the docs, or even better rename the flag and also add a flag that really does mean “-sourcepath” because I actually need one!"
(My reasons for “needing” this flag are unusual, and to do with running javac in an environment where it is a very bad thing to list the contents of the current working directory, which - unfortunately - javac is hard-coded to do in it’s search for sources; I wanted it to use sourcepath to force it to look in a sub-dir ONLY, and not list the CWD, which incurs a massive performance penalty)
If you want to know more, I suggest you get a JDC ID (sorry - I hate the fact you need to do this, but it is free), go to Sun’s Bug Parade (google for it), do a search for bugs to do with sourcepath, and read the bug and the comments.