In Java version >= 6, you should not need to add them explicitly.
They are part of the JDK. Just try to skip adding them, maybe
the list of instructions is outdated.
Before Java 6, you would have needed to add this jar, I think: jsr250-api-1.0.jar.
Not sure if this is still relevant, but for Java 8, I had to add the two following Maven dependencies in order to get javax.annotation.concurrent.ThreadSafe to work:
<dependency> <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> <version>3.0.0</version> </dependency>
Your comment indicates this is for Guava, so you want the JSR305 library, which extends the
2020 Update: Note that this library breaks the Oracle licensing agreement and Guava has since moved to checkerframework's Nullable annotation.
The dependency including version:
<dependency> <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> <version>1.3.2</version> </dependency>
Or for the newer
<dependency> <groupId>jakarta.annotation</groupId> <artifactId>jakarta.annotation-api</artifactId> <version>1.3.5</version> </dependency>
The Java Common Annotations Module java.xml.ws.annotation was deprecated in Java version 9 and was removed in java version 11. If this leads to a problem you could try to add javax.annotation.
The Javadocs for Java 8 can be found here: http://docs.oracle.com/javase/8/docs/api/javax/annotation/package-summary.html
- Where does Eclipse print messages that it outputs within an annotation processor?
- eclipse annotation processor not working. Where are errors shown?
- Where is the Keytool application?
- Eclipse, where to change the current debug line background?
- Where can I view Tomcat log files in Eclipse?
- Where in an Eclipse workspace is the list of projects stored?
- Eclipse: Java, see where class is used
- @Documented annotation in java
- Ignoring of Checkstyle warnings with annotation @SuppressWarnings
- Where is web.xml in Eclipse Dynamic Web Project
- Which @NonNull Java annotation to use
- Where is the correct location to put Log4j.properties in an Eclipse project?
- Where does Eclipse store preferences?
- Where does Eclipse look for eclipse.ini under Linux
- Where to put the external jars?
- Where can I download Eclipse Android bundle?
- Java in Eclipse: Where do I put files on the filesystem that I want to load using getResource? (e.g. images for an ImageIcon)
- Java/Eclipse on MacOSX: where is the src.zip?
- How to see from where a public method is called in Eclipse using Java?
- Understanding @SuppressLint("NewApi") annotation
- Where is "create project from existing source" in eclipse Indigo?
- Eclipse 3.8: where is the download site?
- Eclipse The hierarchy of the type ... is inconsistent with @Configurable annotation
- Where is classical vertical scrollbar in PyDev?
- Where to change highlight color for selected occurrences in Eclipse?
- maven plugins stored where
- Where is the "work" directory located for a Tomcat instance running in Eclipse?
- Where does Eclipse save the list of files to open on startup?
- Where to put static files for Spark Web Framework?
- Where is the location of 'plugins' directory for eclipse mars in mac OSX?
More Query from same tag
- how to hide revision number from eclipse explorer view?
- DISTINCT not eliminating the duplicate records- Why?
- What is difference between CDC, JRE, OSGi execution environment?
- playn-showcase-html is not a GWT project
- How to access resource files from java dynamic web application
- Android tools not showing in eclipse after update
- How to restore a project into eclipse from .metadata file
- Is it possible to install python libraries such as Numpy, Scipy, Pandas and Matplotlib and statsmodels into Eclipse
- cannot start eclipse neon on macOS Sierra
- Vim Open Resource
- Eclipse ui not working properly?
- Eclipse STS Gradle Plugin Dependency Breaks
- Remove committed git folder from repo but not from local
- Display.show is not shopwing up sometimes post resuming backgrounding
- Fast compiler error messages in Eclipse
- How to filter away all the methods except an exact string in the Eclipse outline view
- RESTful Web service in Java desktop application
- Java Eclipse SWIXml Error
- Mixing java, scala and xtend files in one project?
- How do you test these setter methods using Junit and Eclipse?
- How to get autocomplete feature for cocos2d-x on eclipse?
- Eclipse Subversive add new files to version control
- Show only current branch in Mercurial Eclipse history view
- can anyone tell me what does the Soap bindings mean??
- Writing a simple servlet. Getting and sending data via servlet
- JVM version conflict prevents Eclipse / Jetty from functioning properly
- wicket Exception starting filter wicket
- Eclipse Auto-Correct Feature?
- Eclipse doesn't see class/package in import
- android : google map working in tablet not in vmware why?