我尝试按照以下说明配置 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
这是您可以输入此类参数的唯一位置,并且它符合您在问题中提到的关于 Automatic invocation from javac (annotated classes only) 的 DataNucleus 编译指令。 :
If using Eclipse you need to edit your project properties.
Go toJava Compiler -> Annotation Processing
and enable the project specific settings and enable annotation processing.
Then go toJava 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/