Cannot load resources in Annotation Processor (Not on classpath)

后端 未结 3 519
庸人自扰
庸人自扰 2021-01-04 01:31

I have an annotation processor which shall generate a enumeration with the keys defined by getter methods of an interface.

The interface resides in

3条回答
  •  情书的邮戳
    2021-01-04 01:36

    As a workaround you could try to add the classpath you need to use via a command line argument -Xboothclasspath/a:path, the /a will append the value in path to the boot class path. You would need to add this as a command line option to the actual annotation processing run so in Eclipse that would be: Right click project, select properties, Java Compiler, Annotation Processing, click New in the table and add key -Xbootclasspath/a and the path to add as value. I'm afraid I haven't tried this for annotation processing but it's worth a try!

提交回复
热议问题