Skip to main content

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

On 10/25/06, Fabio Fagundes Silveira <ffs@xxxxxx> wrote:
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?  :-)


I think there is a LTW classloader around (I cannot find it now) and
this would be the direction into which you should look. Without
loading the new classes through a special classloader you will have
other chance to weave 'em.

./alex
--
.w( the_mindstorm )p.


Regards,
Fabio
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top