[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] using javac
|
It's a known bug for 1.1.1 (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=43972) that is fixed in CVS HEAD. So you can wait for 1.2 or you can check out the latest version from CVS HEAD and build a fixed version yourself.
There is also a work-around that Eric Jain devised (see http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg01271.html).
Ron Bodkin
Chief Technology Officer
New Aspects of Software
m: (415) 509-2895
> ------------Original Message------------
> From: robert kuzelj <robert_kuzelj@xxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Wed, Feb-11-2004 5:06 AM
> Subject: [aspectj-users] using javac
>
> hi,
>
> i have some really strange problem when using the javac compiler
> whth a ajc compiler created jar file.
>
> say i have the following classes aspects
>
> <code>
> public class DefaultFoo{}
> public interface IFoo{public void bar();}
>
> public aspect FooImpl
> {
> public void Foo.bar(){}
> }
>
> public aspect FooWeaver
> {
> declare parents: DefaultFoo implements Foo;
> }
> </code>
>
> i compile all of this into a jar file (foo.jar).
> when i call now "javap -classpath foo.jar DefaultFoo"
> the following line will be printed
> ...
> public void bar()
> ...
>
> so i should at least safely assume the jar contains the class
> with the woven implementation of bar (or shouldnt i?).
>
>
> now the interessting part happens...
> if i use the following java class
> <code>
> import DefaultFoo;
>
> public class DefaultFooUser
> {
> public static void main(String[] _args)
> {
> DefaultFoo df = new DefaultFoo();
> df.bar();
> }
> }
> </code>
>
> if i compile this with the ordinary javac i will get an compiler error
> on the statement "df.foo()" (can resolve method foo on ...). if i
> compile with ajc everthing will work fine. i must admit i am completely
> stumped as i thought i could use any jar file produced by aspectj and
> use it in a more standard environment.
>
> any help
>
> is greatly appriciated.
>
> ciao robertj
> ps: i am using aspectj 1.1.1
> and jdk 1.4.2_3
>