Be care of the classpath
of META_INF
If aop.xml is located at
<myRootDyrectory>\META-INF\aop.xml
The correspondent classpath
must be : <myRootDyrectory>
and not <myRootDyrectory>\META-INF
Cordialement / Best regards
Jean-Louis Pasturel

De :
aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] De la part de Tyler DeWitt
Envoyé : lundi 9 juin 2008
22:37
À : aspectj-users@xxxxxxxxxxx
Objet : [aspectj-users] using
-javaagent (aj5)
Hello all,
I am trying to implement a simple test aspect to use load
time weaving. I have a simple java program (Hello.java) and a simple
aspect (World.aj). I used >>javac Hello.java to compile the java
program to Hello.class. I then used >>ajc World.aj -outjar
World.jar to compile the aspect to World.jar. I then created a folder
called META-INF and in that folder I created aop.xml. I then added
META-INF to my CLASSPATH variable. I set ASPECTPATH to
work_dir/World.jar. If I type >>aj Hello the weaving takes
place. If I type >>aj5 Hello the weaving does not take
place. I tried to write a bogus aop.xml file and nothing changed.
What am I doing wrong? Does someone have step by step instructions for
using aj5? The documentation does not make sense to me on the AspectJ
website. Specifically, I need to understand the usage of the -javaagent
(that is what aj5 does) because I will be using aspectJ on Tomcat and cannot
run aj or aj5.
Thanks so much!
Tyler