[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [aspectj-users] Weaving classes in rt.jar | 
On Oct 23, 2008, at 6:59 PM, Mario Mendez-Lojo wrote:
As far as I know, prepending the bootclasspath is the only solution  
to
this problem. You don't necessarily have to use the JDK sources, you
can do binary weaving.
I should have said that weaving the bytecode is not allowed either,  
since it
again implies prepending a modified version of the whole rt.jar  
(around 50MB) to
 the boot classpath.
What I'm trying to do in my app is essentially modify the behavior  
of the JDK
classes *without* having to tell the user "install my Java  
app...and, by the
way, download this 50MB file and replace your rt.jar with it"
Solving the problem at load time seems to be the only solution, but  
maybe I'm
missing something.
Hi,
  In fact, you need to instrument the rt.jar statically, and even you  
will have one version per aspect...
  With our tool, the instrumentation of the full jdk takes around 2-3  
minutes, so it's not a big issue, because this is done once. As David  
said, using prepending with the Xbootclasspath is the only solution.   
Application code is instrumented at loadtime.
  The main problem for JDK instrumentation/weaving is that  
modification of core classes breaks the bootstrap and crashes the VM.  
Also there are some restrictions to the instrumentation, e.g. changing  
the hierarchy of classes in the aspect. Our framework uses bypasses to  
revert to the original code during bootstrap, and also bypasses  
instrumented code to avoid infinite recursions.
Cheers,
Alex
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users