Version 1.0.5 released on June 27, 2002.
<aspectj install dir>/bin
ajc
: compiler for the AspectJ languageajdoc
: tool for generating HTML API documentation,
including crosscutting structure (early-access)
ajdb
: debugger for .class files produced by
ajc
(early-access)
ajbrowser
: GUI for compiling programs with
ajc
and navigating the
crosscutting structure (early-access)<aspectj install dir>/lib
aspectjtools.jar
: libraries to implement the
AspectJ compiler and core toolsaspectjrt.jar
: libraries to support compiled
AspectJ codeAfter finishing automatic installation, we recommend that you perform the following steps to complete your installation:
2.1 Add <aspectj install dir>/lib/aspectjrt.jar
to your class path
This 26KB .jar file contains several small classes that are required to compile programs with the ajc compiler, and are the only extra classes necessary to run programs compiled with the ajc compiler. You must have these classes somewhere on your class path when running programs compiled with ajc. For detailed instructions please see the Configuration Instructions at the bottom of this document.
2.2 Put the AspectJ bin
directory on your PATH
Modify your PATH to include
<aspectj install dir>/bin
. This will make it easier to run ajc and ajdoc. For detailed instructions please see the Configuration Instructions at the bottom of this document.
2.3 Download the documentation and examples from http://aspectj.org/dl
A tutorial, primer, design notes and example programs are all available for download at http://aspectj.org/dl. We strongly recommend that you download a copy of this material to understand how to use this new language.
If you did not use the automatic installation process, you may wish to create short launch scripts to start ajc and ajdoc easily (section 3).
If you did not use the automatic installation process or the default launch scripts do not work on your system, you may wish to create short launch scripts to start ajc and ajdoc easily.
These scripts use full paths that are system dependent so you will likely have to change these. ajc is used as an example but are also applicable to ajdoc.
Here's a sample launch script for WinNT and Win2K (note that this is single line in the .bat file):
C:\jdk1.3\bin\java.exe -classpath D:\jdk1.3\lib\tools.jar;D:\aspectj0.7\lib\aspectjtools.jar -Xmx64M
org.aspectj.tools.ajc.Main %*
Here's a sample launch script for a Unix shell (on Linux using Sun's JDK1.3):
/usr/java/jdk1.3/jre/bin/java -classpath /usr/java/jdk1.3/lib/tools.jar:/home/aspectj0.7/lib/aspectjtools.jar -Xmx64M org.aspectj.tools.ajc.Main "$@"
<aspectj install dir>/lib/aspectjrt.jar
to your classpathThere are several ways to add this jar file to your classpath:
aspectjrt.jar
to the jdk1.x/jre/lib/ext
directoryaspectjrt.jar
to your CLASSPATH
environment variable (see the next section for details)-classpath aspectjrt.jar
" option when running
programs compiled with ajcThe following instructions use the PATH variable as an example, but this process is identical for the CLASSPATH variable.
You can do the variables permanently for all the shells that you
will run or temporarily only for the current shell. To change the
PATH only in the current shell, and assuming you've installed AspectJ
in C:\apps\aspectj
, type:
> set PATH=%PATH%;C:\apps\aspectj\bin
Changing Environment Variables Permanently on WinNT and Win2000
open the Environment Variables dialog
WinNT: in "Control Panels" double-click "System" and select the "Environment" tab
Win2K: in "Control Panels" double-click "System", select the "Advanced" tab and click the "Environment Variables..." button
select the environment variable for editing, or add it using the "New..." button if it does not exist
add the new entry separated from the others by a semi-colon (;) and close the dialog
note that the change will not affect shells that were already running
Changing Environment Variables Permanently on Win9x
open the AUTOEXEC.BAT with an editor such as NotePad
edit the PATH statement to include the new entry and save
the file, e.g.
PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\DOS;C:\apps\aspectj\bin
note that the change will not affect shells that were already running