IntelliJ IDEA 2016.3 Help

Creating a Library for aspectjrt.jar

This feature is supported in the Ultimate edition only.

To be able to use the AspectJ support, in addition to enabling AspectJ support plugins, you should create a library containing aspectjrt.jar and add this library to dependencies of the modules in which you are going to develop your aspects.

aspectjrt.jar is included in the AspectJ distribution which you can download from the AspectJ website.

Creating a library for aspectjrt.jar and adding it to module dependencies

By the time you start to perform this task, you must have already downloaded and installed AspectJ.

  1. Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
  2. Depending on whether you want to create the new library at the project or the IDE level, select Libraries or Global Libraries.
  3. Click /help/img/idea/2016.3/new.png and select Java.
  4. In the dialog that opens, find and select aspectjrt.jar. (This file is located in <AspectJ installation directory>\lib.)
  5. In the Choose Modules dialog, select the modules in which you want to use this library and click OK.

    As a result, the library is added to dependencies of the corresponding modules.

  6. Click OK in the Project Structure dialog.

See Also

Last modified: 21 March 2017