Annotation processor run from the wrong directory

I configured IDEA to run an annotation processor but that processor is being run from the directory ".IntelliJIdea15\system\compile-server\. " instead of the module's own directory, which causes the processor to fail since it expects to find things in the project's own directory.

How can I tell IDEA to run the annotation processor from the module's directory?

1 comment
Comment actions Permalink

Hi Cedric,

As annotation processors are effectively "plugins for javac", they are executed within javac's process. There are no any special requirements concerning javac's working directory: the compiler including any annotation processors should not depend on compiler process' working directory and should be able to compile and process annotations no matter in what directory the vm process was started. All context information that annotation processor may require is provided by "javax.annotation.processing.ProcessingEnvironment" and "javax.annotation.processing.RoundEnvironment" classes.


Please sign in to leave a comment.