AspectJ Setup and Usage at CCS

About

This page explains how to setup your CCIS accounts to use AspectJ 1.2 with Java 1.4 and AspectJ 1.5 with Java 5.

Setup

In order to be able to use the AspectJ 1.2 compiler and tools from your CCS account you need to first complete the following steps:
  1. Add /proj/demsys/demjava/bin to your PATH environment variable

The following commands are now available on your shell

Testing your Setup

To test your setup for AspectJ 1.2 type the following at your shell prompt:

> ajc1.2 -version

The command should reply with the following:

AspectJ Compiler 1.2.1 built on Friday Nov 5, 2004 at 12:30:41 GMT

Compile

To compile a bunch of Java files use ajc1.2 *.java

And Run

To run bytecode that you have compiled with ajc1.2 type aj1.2 Main To run AspectJ 5 follow the steps above replacing ajc1.2 with ajc5 and aj1.2 with aj5.

More Info on AspectJ

For information on compiler options as well as AspectJ in general visit The AspectJ Web Page

If you want to be more adventurous, use AspectJ 1.5 which supports generics
and annotations. This version is not stable yet.