03-60-440 Principles of Programming Languages
AspectJ Installation Instruction
You can run AspectJ programs either in command line or in IDEs such as Eclipse.
Installing command line AspectJ
AspectJ can be downloaded from eclipse at here. You can choose the latest stable release, which is aspectj-1.7.4.jar as of November 2013. Start the installation by typing the command as below:
It will start installation dialogues, prompting the version of JDK you want to use and installation directories.
Programs written is the AspectJ language are compiled using ajc. In order to use the compiler you have to add <aspectj install dir>/lib/aspectjrt.jar to your CLASSPATH environment variable and <aspectj install dir>/bin to your PATH.
To change those environment variables, use Control Panel/System/Advanced/Environment Variables/System Variables.
Compile and run the program
>ajc Hello.java With.ajNote that there is no comma in beterrn Hello.java and With.aj
Installing AspectJ in Eclipse
To add AspectJ in Eclipse, select
Help/Software updates/Find and install/
Then select "Search for new features to install", then "new
remote site". In the URL box type"
Upon successful installation, you can create a aspectJ project, and you can add aspects.