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

Reply via email to