JBoss.org Community Documentation

- Prev
- Next

### 6.5.1. Ant target for running load-time instrumentation using specialized class loader

In JDK5.0, you can use the `javaagent` option that does not require a separate Classloader. Here are the ant snippet from `one-test-pojo` , for example.

    <target name="one.test.pojo" depends="compile" description="run one junit test case.">
       <junit printsummary="yes" timeout="${junit.timeout}" fork="yes">
          <jvmarg value="-Djboss.aop.path=${output}/resources/pojocache-aop.xml"/>
          <jvmarg value="-javaagent:${lib}/jboss-aop-jdk50.jar"/>
          <classpath path="${output}/etc" />
          <sysproperty key="log4j.configuration" value="file:${output}/etc/log4j.xml" />
          <classpath refid="lib.classpath"/>
          <classpath refid="build.classpath"/>
          <formatter type="xml" usefile="true"/>
          <test name="${test}" todir="${reports}"/>
       </junit>
    </target>

- Prev6.5. Weaving
- Top of page
- Front page
- Next6.5.2. Ant target for aopc