Using the inpath

If you wish to weave into binary files (either that are contained in a jar or in a bin directory), then you need to use the inpath capability.

To setup your AspectJ project to use the inpath:

  1. Select the AspectJ project in the Package Explorer
  2. Right click and select AspectJ Tools > Configure AspectJ Build Path...
  3. Select the Inpath tab
  4. Add the necessary jar file or class folder (e.g. another project's "bin" directory) using the Add XXX buttons
  5. Click OK to close the project properties dialog

When the AspectJ project is built, it will compile the aspects and weave them against the class files specified via inpath and produce a complete set of woven class files in the output directory of the AspectJ project.

The disadvantage of using this approach is that AJDT will not show how the advice in the aspects applies to the input classe. The Cross References view will show that the advice came from an injar aspect, but will not provide any more detail.

Related tasks
Using the aspectpath
Adding an inpath