Since AspectJ LoadTime-Weaving needs to load the JVM with an agent/it's own classloader - is there a way to load/make changes in the user's JVM from my applet? or maybe just before loading the applet (with a parent applet?)
+1
A:
I'm afraid you'll be completely out of luck there. According to the Sun docs on applet classloaders, a "web browser uses only one class loader, which is established at start-up. Thereafter, the system class loader cannot be extended, overloaded, overridden or replaced. Applets cannot create or reference their own class loader" (emphasis mine).
You will probably have more success with compile-time weaving on this problem, unless there's some reason why you can't do that.
If the applet is signed, however, you might be able to work around this. AspectJ is not really clear on what its requirements are by way of Java Security. I'd get on the AspectJ mailing list and ask.
Chris R
2008-09-29 22:24:44