简体   繁体   中英

Why javax.annotation pacakge dose not have type annotations in jdk 8?

I'm try to run some code from the internet which uses type annotations with Intellij IDEA, thelanguage level and JDK is java 8:
problem snap shot the javax.annotation package dose exist yet the type annotations can not be imported, how can I solve this problem?

You don't have the jar that contains this class. Add FindBugs to your pom.xml/ your classpath.

<dependency>
    <groupId>com.google.code.findbugs</groupId>
    <artifactId>findbugs</artifactId>
    <version>3.0.1</version>
</dependency>

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