开发者

Java compile with processors in one command

Is there some way to do compilation of both code and processors in the same javac run? For example when the source tree contains:

a.java   // with annotations
b.java 开发者_如何学Go  // processor
c.java   // referrencing files to be generated

Can I somehow compile it all with one javac invocation?


No, that's not possible. Annotation processing is done in a separate round before compilation, at which point b.java would already have to be compiled. You need to separate compile runs. One for the processor, one for the rest.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜