views:

46

answers:

2

I'm trying to follow these instructions to configure the DataNucleus enhancer:

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

It was all brilliant until I got to the bold text. I can't seem to figure out what they mean. Can someone expand this sentence to be more newbie-friendly. :)

A: 

Adjust javac command-line to:

javac -processor org.datanucleus.enhancer.EnhancerProcessor
RC
Yes yes, this I got. But how do I set that in Eclipse? Google searches are being less than helpful.
David Parks
I think you have to use an Ant build script because eclipse built-in compiler doesn't accept custom command-line args.
RC
A: 

I believe this is in:

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

alt text

This is the only place where you can enter such an argument, and it is compliant with the DataNucleus compilation instruction that you mention in your question, about the Automatic invocation from javac (annotated classes only):

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

The fact those instructions are for annotated classes make them eligible for this "Annotation Processing" setting.

VonC