简体   繁体   English

在带有eclipse的注释处理器中使用第三方库

[英]Using a third party lib in an annotation processor with eclipse

maybe I do not see the wood for the trees, but I made an AnnotationProcessor and embedded it in eclipse. 也许我看不到树木的木头,但是我做了一个AnnotationProcessor并将其嵌入了eclipse中。 Works fine so far....but what if I need some 3rd party libs? 到目前为止工作正常。...但是如果我需要一些第三方库怎么办? I don't see any option to add those jars to the classpath. 我看不到将这些罐子添加到类路径的任何选项。 How/Where do I configure that in eclipse? 如何/在eclipse中进行配置?

Many many thanks! 非常感谢!

Just found the solution thanks to the eclipse forum :). 刚刚通过eclipse论坛找到了解决方案:)。 Third party libraries have to be added to the factory path ... just like the jar, which includes the processor. 第三方库必须添加到工厂路径中,就像包含处理器的jar一样。

Right click on your project. 右键单击您的项目。 Select "Build Path"/"Configure Build Path". 选择“构建路径” /“配置构建路径”。 When dialog appears choose "Libraries" tab. 出现对话框时,选择“库”选项卡。 Here you can add almost anything you want to the class path. 在这里,您几乎可以将任何所需的内容添加到类路径中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM