gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 07:36:05 25 4
gpt4 key购买 nike

我正在尝试按照这些说明配置 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com