On 25 May 2012 14:43, trhouse <trho...@gmail.com> wrote: > Newbie here. I just need a sanity check here on LTW. Here is what I think > ought to happen > > Given a properly constructed aspect and a properly configured and placed > aop.xml, I can run any java program which has been compiled by regular old > javac and have LTW apply aspects against it at runtime.
Yep. > To achieve the above I have to do the all and only the following (aside from > compiling the aspect with ajc and writing aop.xml): > > make certain that the classpath for regular old java program includes: > > jar://<path to aspectJ>aspectj1.6/lib/aspectjrt.jar!/ > <path to compiled aspects> > <path to aop.xml containing META-INF folder> > > and for VM options include: > -Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader I wouldn't do it that way. I'd use the agent: java -javaagent:pathto/aspectjweaver.jar MyPlainJavaProgram You should just need the java code and aspect code (and META-INF folder) on the classpath. cheers, Andy _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users