[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Extending standard java classes
|
On Dec 2, 2008, at 3:17 PM, Tassilo Horn wrote:
Hi all,
I'm pretty new to AOP, so please excuse me if this is a FAQ, but at
least I grepped the FAQs and didn't find an answer. :-)
What I want to do is to add an interface to some classes. From the
documentation I can see how that's done, but unfortunately I want to
add
this interface to about 10 classes from java.lang and java.util.
When I did that I got warnings that the affected types aren't
exposed to
the weaver. So I added the JRE System Library to the *inpath*. But
then I don't have enough memory to run the aspectj compiler.
Hi,
You could simply edit ajc script and change the -Xmx param (e.g. -
Xmx1G)
So is there a way to pick only the 10 classes I need out of the
library?
One way is to unjar the rt.jar on a directory, and then make your
own jar with the classes you need, and weave them.
Something like
mkdir JDK
cd JDK
jar xvf $JAVA_HOME/jre/lib/rt.jar
jar cvf myrt.jar java/lang/... java/util/...
Then you weave myrt.jar and finally pass the woven myrt.jar to -
Xbootclasspath/p:
Cheers,
Alex
Thanks for any pointers,
Tassilo
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users