12

Everything I see online just says to select the "ajc" compiler from the list of compilers, but that's not an option for me. I've got javac, jikes, eclipse, and javac-in-process, but that's it.

As it is my project compiles from the command line with maven, but if I type anything in the IDE that uses an aspect, I get compiler warnings.

Phil Kulak
  • 6,960
  • 8
  • 45
  • 50

3 Answers3

6

Make sure AspectJ Support plug-in is enabled in Settings (Preferences on Mac) | Plugins. Follow the documentation for more details.

When using proper Maven project, ajc compiler will be enabled automatically.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
0

If you don`t see this option you're maybe not using the ultimate edition.

This option is available only in the Ultimate Edition of IntelliJ IDEA.

Documentation

Bruno Silva
  • 548
  • 3
  • 6
0

Maybe it's late. here is my experience: go to Settings --> Compiler --> Java Compiler

  1. Set Use Compiler to Ajc
  2. Set Path to aspectjtools.jar to something like the following: ~/.m2/repository/org/aspectj/aspectjtools/1.8.1/aspectjtools-1.8.1.jar
Askar
  • 544
  • 1
  • 6
  • 17