简体   繁体   中英

Netbeans error Annotation processor 'org.checkerframework.checker.nullness.NullnessChecker' not found

I'm trying to get NonNull annotations working in NetBeans, and it's been one headache after another.

I followed the instructions at https://checkerframework.org/manual/#netbeans and can confirm that checker-qual.jar is added as both a compile and processor library. I've enabled annotation processing and added org.checkerframework.checker.nullness.NullnessChecker as an Annotation Processor.

In the source code I can import import org.checkerframework.checker.nullness.qual.NonNull and have @NonNull annotations compile. However while building I get this:

error: Annotation processor 'org.checkerframework.checker.nullness.NullnessChecker' not found

What do I need to do to resolve this error?

The instructions for the NetBeans processor path are incorrect: they first talk about adding checker.jar , but then mention checker-qual.jar https://github.com/typetools/checker-framework/blob/master/docs/manual/external-tools.tex#L904

checker.jar contains the actual annotation processor and should be put on the processor path. I'll update the instructions.

However, we did not yet find a way to add the annotated JDK jdk8.jar to the bootclasspath that the processor uses. Therefore, none of the JDK annotations that are provided will be visible within NetBeans. We will therefore need to remove support for the Nullness Checker from NetBeans, until we find a proper solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM