Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Weave Class Files

Try using -injars and -outjar options  to do that.
An example of this is:

ajc MyAspect.java -injars (here goes a list including jar files with the .class
to modify) -outjar (the jar (only one) where all the modified class files goes).

And aditional warning is that the resulting jar only contains class files, other
kind of files such dtd's or another kind of meta-info won't be present at the
resulting jar so you got to unpack the original jar modify the classes and
repack it again.

I Hope this will be usefull.

Dave Garcia

 

Quoting ravi varanasi <varanasir@xxxxxxxxxxx>:

> Hi,
>     I want to weave class files for which I do NOT have source code. IS it
> possible to weave an aspect on a class file (for which source is not
> avaiable) ? 
> 
> My understanding was that AspectJ 1.1 has this features. But, I dont see such
> option. Can anyone suggest how I can do this ? 
> 
> Thanks,
> 
> Ravi Varanasi




Back to the top