I think I understand now.
The documentation for javac says that javac expects source files to live in a
package tree, but that does not apply to the
source files on the command line.
> On Dec 21, 2023, at 10:07 AM, Alan Snyder
> wrote:
>
> Thank you for the suggestion. It seems to work.
>
>
Thank you for the suggestion. It seems to work.
I do not understand why my previous snippet worked. If java used srcdir=“.” as
the root of a package tree,
then why did it compile files in a and b as top level classes? (The files in a
and b did not declare a package.)
Alan
> On Dec 20, 2023,
Alan. I never used srcpath before and after some trial and error I feel that
the source of the problem is bad description of the option in JDK.
Ant passes srcpath directly to JDK's javac (unlike srcdir which Ant itself
searches for java files).
The description says "Specify" or "Specifies", but
This actually does what I want:
The problem is that I don’t really want to specify srcdir, but if I leave it
out, the build fails (see below).
I would need to create a fake directory to use as srcdir to be sure that I
don’t accidentally compile unwanted source
Hello Alan,
It's hard to say what's going on. Do you have a build file (or a
snippet) to show what issue you are running into?
Which version of Java and Ant is this showing up on?
-Jaikiran
On 18/12/23 1:44 am, Alan Snyder wrote:
I know of a couple of ways to run javac on more than one sour