I think you need to try:
*javac -Xbootclasspath/p:woven-rt.jar Main.java
*you need to add /p to say "prepend.
also, you might need to add aspectjrt.jar as well for certain things:
*javac -Xbootclasspath/p:woven-rt.jar;aspectjrt.jar Main.java
*
Mike
*
*
On Tue, Feb 2, 2010 at 12:17 AM, H G <[email protected]> wrote:
>
> Hi all,
>
> I'm adding ITD to rt.jar and so far I've weaved rt.jar successfully.
> But, for some reason I'm not able to access the new ITD from my
> woven-rt.jar.
> I've done my homework (6-hour googling to find some hints), but no luck.
> So, I'd deeply appreciate if I can get any help here.
>
> Here's my simple aspect, where I just want to add "String test" to the
> claas java.io.File:
>
> * package mytest;
> public interface ClassWC { };
> public aspect weavert {
> declare parents: File implements ClassWC;
> public String ClassWC.test;
> }
>
> *I compiled that, and ran javap on my woven-rt.jar:
>
> * javap java.io.File -bootclasspath woven-rt.jar*
>
> I get this:
>
> * public class java.io.File
> extends java.lang.Object
> implements java.io.Serializable,
> java.lang.Comparable,
> mytest.ClassWC {
> ...
> public java.lang.String
> ajc$interField$mytest_weavert$mytest_ClassWC$test;
> ...
> }*
>
> So up to this point, everything seems okay.
> Now, here's my simple test program (Main.java) where I just want to
> see if File.test is accessible or not.
>
> * main() {
> File f = new File("file.txt");
> String test = f.test;
> }
> *
> I compiled that:
>
> * javac -Xbootclasspath:woven-rt.jar Main.java*
>
> I get this following error:
>
> * Main.java:21: cannot find symbol
> symbol : variable test
> location: class java.io.File
> String test = f.test;*
>
>
> I totally have no clue why I cannot access File.test.
> I try to make the original rt.jar unreadable (chmod 000)
> to verify that javac is not reading the original rt.jar.
> It turns out I get this error:
>
> * java/lang/ClassNotFoundException: error in opening JAR file <Permission
> denied>*
>
>
> I believe I use bootclasspath properly.
> Please help me point where I did wrong.
> Thanks again for your time!
>
> Harry
>
>
>
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
--
Michael D. McCray
Consultant - Technology Partners, Inc.
President - Object Nirvana, Inc.
Maker of
My People Database
- automation for what you do with your friends and family, and a place to
store your stories and information.
Website: http://www.mypeopledatabase.com/
Transcendental Beans Database
- an aspect oriented database system,
the future of data storage
Website: http://www.objectnirvana.com
Open source version: http://transcendentalbeans.dev.java.net/
Tweat Market - Twitter Dating Client
http://www.tweatmarket.com/
Blog: http://aodbms.blogspot.com
Email: [email protected]
Twitter: http://twitter.com/seagullmike
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users