Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ajdt-dev] Problems (bugs??) in building and running AspectJ programs using AJDT

I have run into a problem executing the AspectJ programs inside Eclipse
AJDT 1.1.1, possibly due to my ignorance in AJDT. I have run into another
problem in AspectJ project build process, which is quite likely to be a
real AJDT bug.

Environment:
Eclipse 2.0.2
AJDT 1.1.1

Setup:
I am testing my Eclipse/AJDT setup using the aspectJ samples. I created a
directory called AspectJSample\src with all the source files. I then
created a AspectJ project with seperate src and bin directories. The
AspectJ project wizard picked up the source files and the .lst files
correctly.

I click on the AspectJ build button, selecting <all project files>.
AJDT compiles and weaves all the projects correctly. I have tested the
generated class files using command line JavaVM. They run correctly.

Possible bug in building single project:
I delete the generated class files for a single project, outside of
Eclipse. I then select a single project (.lst) again using the AspectJ
build button in the toolbar. The build popup window pops up for a short
while, and appears to the rebuild the project (.lst). However no class
files are actually generated.

However the AspectJ build button seems to work correctly if I choose <all
project files>. AJDT will pop up the build popup window, and actually
re-generates all the class files for all projects.

There appears to be an inconsistency in the behaviour for the AspectJ build
button.


Possible bug in running AspectJ applications:
I open tracing\version3\TraceMyClasses in eclipse. I then Run > Run As >
Java Application.
Eclipse/AJDT reports "Launch failed: no main type found"

This is very strange. I can run tracing.version3.TraceMyClasses directly
from the command line, using the class files generated by AJDT in the
build process. Am I making an obvious mistake? Is there a different way to
run AspectJ programs?

An examination of tracing.version.TraceMyClasses shows the main() embedded
within the aspect. TraceMyClasses is not a normal Java class, but an
aspect. This may be causing Eclipse/AJDT confusion.

Is there an workaround for this problem?



Thank you, all help is appreciated :-)

Regards,
Stephen





Back to the top