<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.3//EN">
<!-- this file is based on:                              -->
<!--  aspectj/org.aspectj/modules/docs/devGuideDB/aj.xml -->
<!-- it was slightly modified to cover aj5               -->
<refentry id="aj-ref" xreflabel="The aj Command-line Reference">
  <refmeta>
    <refentrytitle>aj</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>aj, aj5</refname>
    <refpurpose>command-line launchers for load-time weaving</refpurpose>
  </refnamediv>  

  <refsynopsisdiv>
    <cmdsynopsis>
       <command>aj</command>
      <arg><replaceable>Options</replaceable></arg>
      <group>
        <arg><replaceable>arg...</replaceable></arg>
      </group>
    </cmdsynopsis>

    <cmdsynopsis>
       <command>aj5</command>
      <arg><replaceable>Options</replaceable></arg>
      <group>
        <arg rep="repeat"><replaceable>arg</replaceable></arg>
      </group>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="aj" xreflabel="aj">
    <title>DESCRIPTION</title>

    <para>The
      <command>aj</command> command runs Java programs in Java 1.4 or
      later by setting up
      <literal>WeavingURLClassLoader</literal> as the system class
      loader, to do load-time bytecode weaving. </para>

    <para>The
      <command>aj5</command> command runs Java programs using AspectJ Java5 JVMTI
      agent to do load-time bytecode weaving. </para>

    <para> The arguments are the same as those used to launch the Java program.
      Users should define the environment variables
      <literal>CLASSPATH</literal> and
      <literal>ASPECTPATH</literal>. </para>

  </refsect1>
</refentry>
