IntelliJ IDEA 2017.1 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/2017.1/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: 18 July 2017