Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] lauching applications from another one with load-time weaving

Hello,

   To launch an application from another java program is possible using
reflection, such as:

Class cls = Class.forName("Test");
String s[] = new String[] {};
Object arguments[] = new Object[] { s };
Method mainMethod = cls.getMethod("main", new Class[] {s.getClass()});
Object result = mainMethod.invoke(null, arguments);

  Ok, but how to do that (ie. launching "Test" application) using
load-time weaving? I meant, lauching Test and aspects defined to be
applied to this class in a META-INF/aop.xml file?

  I've tried to find out any WeavingAdaptor tutorial or something like
that ... but I didn't  ... :-(

  Could you help me?  :-)

Regards,
Fabio


Back to the top