Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Problems (bugs?) in building and running AspectJ programs in AJDT 1.1.1
Problems (bugs?) in building and running AspectJ programs in AJDT 1.1.1 [message #18772] Thu, 27 March 2003 05:44 Go to next message
Eclipse UserFriend
Originally posted by: scheng.clear.net.nz

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. I would appreciate any help (and please cc reply to my
email directly).

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 the project (.lst).
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 the 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 a bug for single project build.


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. Should I run the AspectJ application using a different
method?

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
Re: Problems (bugs?) in building and running AspectJ programs in AJDT 1.1.1 [message #18952 is a reply to message #18772] Tue, 01 April 2003 16:20 Go to previous message
George Harley is currently offline George HarleyFriend
Messages: 70
Registered: July 2009
Member
Hi,

Using Eclipse 2.1 I have been unable to recreate the build problem that you
encountered. If upgrading is an option for you then perhaps you would like
to see if you get any different behaviour.

With regards to the execution problem that you encountered, I think that
this could be down to how you are trying to launch the Java application.
Please try the following steps and see how you get on.

1. Do a project build as normal.
2. From the top menu select "Run" => "Run..."
3. In the panel (entitled "Run") that pops up, select "Java Application" in
the left hand window and then click on the "New" button.
4. In the next panel (also entitled "Run") that pops up, type a name for
the launch configuration in the "Name:" field. This can be anything you
want like "MyApplication" (without the quotes!).
5. Eclipse needs to know a main class to run. For a Java project it is
enough to just click on the "Search..." button on the right of the panel
and it will provide you with a list of Java classes in the project that
have a main method. Unfortunately, for an AspectJ project, this facility is
not yet capable of searching for aspects that contain a main method. To get
around this just type the fully qualified name of the aspect in the "Main
class:" field which is sort of central in the panel. For the example you
describe I typed in "tracing.version3.TraceMyClasses" (without the quotes!)
..
6. Click on the "Apply" button for your application details to be persisted
by Eclipse.
7. Click on "Run" to launch the tracing.version3.TraceMyClasses
application.

Next time you want to run the application you can just click on the arrow
to the right of the running man button in the top tool bar. The name of
your launch configuration (i.e. the name supplied in step 4 above) should
be visible in the drop down menu. Click on it to make that particular
application run.

Next time you want to change any details of your application like passing
it arguments or changing the main class/aspect then click on the arrow to
the right of the running man button in the top tool bar again. This time
select "Run..." from the drop down menu. In the "Run" panel that pops open
select your application by name from the "Configurations:" window on the
left and then take it from there.

George


On Thu, 27 Mar 2003 05:44:47 +0000 (UTC), Stephen Cheng
<scheng@clear.net.nz> wrote:

> 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. I would appreciate any help (and please cc reply to my
> email directly).
>
> 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 the project (.lst).
> 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 the 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 a bug for single project build.
>
>
> 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. Should I run the AspectJ application using a different
> method?
>
> 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
>
>
>
>
>
Re: Problems (bugs?) in building and running AspectJ programs in AJDT 1.1.1 [message #565361 is a reply to message #18772] Tue, 01 April 2003 16:20 Go to previous message
George Harley is currently offline George HarleyFriend
Messages: 70
Registered: July 2009
Member
Hi,

Using Eclipse 2.1 I have been unable to recreate the build problem that you
encountered. If upgrading is an option for you then perhaps you would like
to see if you get any different behaviour.

With regards to the execution problem that you encountered, I think that
this could be down to how you are trying to launch the Java application.
Please try the following steps and see how you get on.

1. Do a project build as normal.
2. From the top menu select "Run" => "Run..."
3. In the panel (entitled "Run") that pops up, select "Java Application" in
the left hand window and then click on the "New" button.
4. In the next panel (also entitled "Run") that pops up, type a name for
the launch configuration in the "Name:" field. This can be anything you
want like "MyApplication" (without the quotes!).
5. Eclipse needs to know a main class to run. For a Java project it is
enough to just click on the "Search..." button on the right of the panel
and it will provide you with a list of Java classes in the project that
have a main method. Unfortunately, for an AspectJ project, this facility is
not yet capable of searching for aspects that contain a main method. To get
around this just type the fully qualified name of the aspect in the "Main
class:" field which is sort of central in the panel. For the example you
describe I typed in "tracing.version3.TraceMyClasses" (without the quotes!)
..
6. Click on the "Apply" button for your application details to be persisted
by Eclipse.
7. Click on "Run" to launch the tracing.version3.TraceMyClasses
application.

Next time you want to run the application you can just click on the arrow
to the right of the running man button in the top tool bar. The name of
your launch configuration (i.e. the name supplied in step 4 above) should
be visible in the drop down menu. Click on it to make that particular
application run.

Next time you want to change any details of your application like passing
it arguments or changing the main class/aspect then click on the arrow to
the right of the running man button in the top tool bar again. This time
select "Run..." from the drop down menu. In the "Run" panel that pops open
select your application by name from the "Configurations:" window on the
left and then take it from there.

George


On Thu, 27 Mar 2003 05:44:47 +0000 (UTC), Stephen Cheng
<scheng@clear.net.nz> wrote:

> 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. I would appreciate any help (and please cc reply to my
> email directly).
>
> 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 the project (.lst).
> 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 the 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 a bug for single project build.
>
>
> 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. Should I run the AspectJ application using a different
> method?
>
> 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
>
>
>
>
>
Previous Topic:WSAD 5.0 / ANT 1.5.1 / AJDT 1.1.1
Next Topic:adding aspects to .class files?
Goto Forum:
  


Current Time: Tue Apr 23 11:55:36 GMT 2024

Powered by FUDForum. Page generated in 0.03244 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top