You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

aj.adoc 946B

1234567891011121314151617181920212223242526272829303132333435363738
  1. = `aj`, the AspectJ load-time weaving launcher
  2. == Name
  3. `aj` - command-line launcher for basic load-time weaving
  4. == Synopsis
  5. [subs=+quotes]
  6. aj [_Options_] [_arg_...]
  7. [[aj]]
  8. == Description
  9. The `aj` command runs Java programs in Java 1.4 or later by setting up
  10. `WeavingURLClassLoader` as the system class loader, to do load-time
  11. bytecode weaving.
  12. The arguments are the same as those used to launch the Java program.
  13. Users should define the environment variables `CLASSPATH` and
  14. `ASPECTPATH`.
  15. For more information and alternatives for load-time weaving, see
  16. xref:ltw.adoc#ltw[Load-Time Weaving].
  17. == Examples
  18. Use ajc to build a library, then weave at load time
  19. [source, text]
  20. ....
  21. REM compile library
  22. ${ASPECTJ_HOME}\bin\ajc.bat -outjar lib\aspects.jar @aspects.lst
  23. REM run, weaving into application at load-time set
  24. ASPECTPATH=lib\aspects.jar set CLASSPATH=app\app.jar
  25. ${ASPECTJ_HOME}\bin\aj.bat com.company.app.Main "Hello, World!"
  26. ....