java - 如何在 Eclipse 中设置编译器选项 'processor'?

标签 java eclipse datanucleus

我尝试按照以下说明配置 DataNucleus 增强器:

If using Eclipse you need to edit your project properties. Go to Java Compiler -> Annotation Processing and enable the project specific settings and enable annotation processing. Then go to Java Compiler -> Annotation Processing -> Factory Path , enable the project specific settings and then add the following jars to the list: datanucleus-enhancer.jar , datanucleus-core.jar , jdo-api.jar and asm.jar and set the compiler argument processor to org.datanucleus.enhancer.EnhancerProcessor

一切都很棒,直到我看到粗体文本。我似乎无法理解他们的意思。有人可以扩展这句话以使其对新手更友好吗? :)

最佳答案

我相信这是在:

Java Compiler
  Annotation Processing
    => Process options
    key= processor
    value=org.datanucleus.enhancer.EnhancerProcessor

alt text

这是您可以输入此类参数的唯一位置,并且它符合您在问题中提到的关于 Automatic invocation from javac (annotated classes only) 的 DataNucleus 编译指令。 :

If using Eclipse you need to edit your project properties.
Go to Java Compiler -> Annotation Processing and enable the project specific settings and enable annotation processing.
Then go to Java Compiler -> Annotation Processing -> Factory Path , enable the project specific settings and then add the following jars to the list:

  • datanucleus-enhancer.jar,
  • datanucleus-core.jar,
  • jdo-api.jar and
  • asm.jar

and set the compiler argument processor to org.datanucleus.enhancer.EnhancerProcessor

事实上,这些说明适用于带注释的类,因此它们符合此“注释处理”设置的条件。

关于java - 如何在 Eclipse 中设置编译器选项 'processor'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4007503/

相关文章:

Java xml 解析器循环

java - 使GUI从双数组更新信息?

java - Android:放大但保持元素的比例

html - 在eclipse中添加html和css

java - Google App中的应用程序身份问题

java - 执行 SQL UPDATE 语句后刷新 JTable

java - ContentProposalAdapter 接受通过键盘选择的建议,但不接受通过鼠标选择的建议

java - 如何编译.class文件

java - 数据存储计数查询 fetchOptions

java - JDO数据核: Annotator @Column(jdbcType ="") not working