Oracle documentation on javac
says that -s
switch is used to specify the directory where to place generated source files. What are those 'generated source files' and why one would need them? I always thought that source files were 'generated' by humanware...
This seems to be related to the Annotation Processing part of javac
. Apparently, you can use annotation processors while compiling the humanware-generated source, and those processors may generate source files as part of processing certain annotations:
If any processors generate new source files, then another round of annotation processing occurs: Any newly generated source files are scanned, and the annotations processed as before. Any processors called on previous rounds are also called on all subsequent rounds. This continues until no new source files are generated.
After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work. Finally, unless the -proc:only option is used, the compiler compiles the original and all generated source files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With