Prior to using annotations, they should be enabled in project.
To enable annotations in a project, follow these general steps
- Click to open the project structure dialog.
- In the Project Structure dialog box, click Libraries.
- Click . Select Library Files dialog box opens.
- Under that <IntelliJ IDEA home> directory, select
lib/annotation.jar, and click OK:
- If your project contains more than one module, choose the desired module to be modified, and click OK:
The new library is added to the classpath:
Last modified: 6 April 2015