Eclipse import static java.lang.annotation.ElementType.* Error

27 Views Asked by At

I want to build customized annotation class in eclipse, however, it could import static RetentionPolicy enum, CANNOT import ElementType.

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

The error message is

The type java.lang.annotation.ElementType cannot be resolved. It is indirectly referenced from required type java.lang.annotation.Target

How should I setup the configuration in eclipse because these codes can be built in command and IntelliJ

0

There are 0 best solutions below