AJDT is the Eclipse AspectJ development Tools. is an eclipse plugin that can write AspectJ projects
Installation
Help-->install New Software
Fill in the online installation address: http://download.eclipse.org/tools/ajdt/47_aj9/dev/update
After the installation is complete, create a new ASPECTJ project
The project structure is as follows
Copy the AJ file and the contents of the Java file from the previous blog.
The new method of the AJ file
File-->new-->project Select AspectJ Project
When running, select the Java file and right-click Run As-->aspectj/java Application
Run results
Here's a look at the configuration of the load project at run time
New project Structure
Where the AJ file content
Tracing.ajpublic aspect Tracing {private Pointcut Mainmethod (): Execution (public static void Main (string[])); Before (): Mainmethod () {System.out.println (">" + thisjoinpoint);} After (): Mainmethod () {System.out.println ("<" + Thisjoinpoint);}}
Run-->run configurations
Run project type select: Aspect load-time Weaving Application (the default is the one below Aspect/java application take care not to choose the wrong)
Project:aspectjdemo3
Main Class:com.zelix.ZKM
LTW Aspect Path: Add J external jar selection Zkm.jar
Finally click on the Run command in the configuration, the result is as follows
There is no use of export jar, are exported to compile period, can not export the load period, perhaps I will not use ...
Eclipse Plugin Ajdt for the aspectj of the Java Reverse Foundation