Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Problem compiling J2SE 5.0 source with ajc

It may sound strange, but what you're doing wrong is trying to compile 
this source with ajc!

The AspectJ 5 M1 release supports *binary* weaving only of Java 5 compiled 
code. In other words, you need to compile your Java 5 classes with javac, 
and then put them on the "inpath" of an ajc invocation. The Eclipse JDT 
team released a full Java 5 compiler in their 3.1 M4 release just before 
Christmas, so our next task is to pick that up and integrate it into 
AspectJ for the M2 release (and then we *will* be able to support source 
compilation). 

Regards, Adrian.

-- Adrian
Adrian_Colyer@xxxxxxxxxx



Russell Miles <russellmiles@xxxxxxx> 
Sent by: aspectj-users-admin@xxxxxxxxxxx
04/01/2005 14:19
Please respond to
aspectj-users@xxxxxxxxxxx


To
aspectj-users@xxxxxxxxxxx
cc

Subject
[aspectj-users] Problem compiling J2SE 5.0 source with ajc






Hi list,

A new year begins and I thought I'd have some fun putting the new J2SE 5.0 
features of AspectJ through their paces. However, I've hit a snag on the 
first attempt. I've got a dead simple class that uses the @Override 
standard annotation to indicate/check that the toString() method is being 
overridden properly. The class does nothing more apart from supplying a 
main method that makes the call to toString() on a constructed object. All 
works fine with javac but as soon as I try to use ajc I get:

Syntax error on tokens, delete these tokens
@Override
^^^^^

Ok, so this seems like something dumb that I've not done correctly on the 
ajc command line so I checked out the help and added the -1.5 to the ajc 
command line just in case ... to no avail. I even rooted through the 
generated ajc script to see if there was anything odd but with no luck. 
Can someone give me a push in the right direction as to what I'm doing 
wrong?

Cheers,

Russ

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top