diff options
Diffstat (limited to 'docs/devGuideDB/aj.xml')
-rw-r--r-- | docs/devGuideDB/aj.xml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/docs/devGuideDB/aj.xml b/docs/devGuideDB/aj.xml new file mode 100644 index 000000000..f9627eb95 --- /dev/null +++ b/docs/devGuideDB/aj.xml @@ -0,0 +1,55 @@ +<refentry id="aj-ref" xreflabel="The aj Command-line Reference"> + + <refnamediv> + <refname>aj</refname> + <refpurpose>command-line launcher for basic load-time weaving</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <cmdsynopsis> + <command>aj</command> + <arg><replaceable>Options</replaceable></arg> + <group> + <arg><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 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> + + <para>For more information and alternatives for load-time weaving, + see <xref linkend="ltw"/>. + </para> + + <refsect2> + <title>Examples</title> + + <example id="simpleexample"> + <title>A simple example</title> + + <para>Use ajc to build a library, then weave at load time</para> + + <programlisting><![CDATA[ + REM compile library + ${ASPECTJ_HOME}\bin\ajc.bat -outjar lib\aspects.jar @aspects.lst + + REM run, weaving into application at load-time set + ASPECTPATH=lib\aspects.jar set CLASSPATH=app\app.jar + ${ASPECTJ_HOME}\bin\aj.bat com.company.app.Main "Hello, World!" +]]> </programlisting> + + </example> + </refsect2> + </refsect1> +</refentry> |