|
|
Re: Setting the exact build environment [message #15240 is a reply to message #15207] |
Fri, 10 January 2003 19:43 |
Eclipse User |
|
|
|
Originally posted by: adrian_colyer.uk.ibm.com
Hi Martin,
Obviously I can't reproduce your exact build environment, but here's how I
believe you can configure Eclipse to do what you want when using AJDT (this
actually uses simply the features of the Eclipse JDT that AJDT inherits):
First off for compiling...
Having created your AspectJ project, use the context menu to select the
project properties, and then select Java Build Path. Go to the libraries
tab and use "Add External Jars..." to add in the additional Jar files you
need for compilation.
THEN... go to the "Order and Export" tab and move your newly added jar
files
up in order so that they are ahead of (e.g.) rt.jar - if your project
requires this - it may be that you can omit this step.
That should now enable you to build your project. Incidentally, there's a
view in AJDT (Window->Show View->Other->AspectJ->AJDT Event Trace) that
displays diagnostic information as AJDT executes. One of the pieces of
information you'll find in that view is the exact classpath that AJDT uses
to perform a compile - can come in very handy for problem solving!!
Then, for running the compiled program:
Eclipse uses "launchers" that hold runtime configuration information for
launching applications. Because AspectJ creates plain Java class files,
AJDT
simply uses the normal Java launcher, unchanged. Choose "Run..." from the
run menu / icon, and then select "Java Application" and click "New."
Give your new configuration a name, and then click on the "Classpath" tab.
Now you need to deselect the "Use default classpath" option at the bottom
of
the page. Select the jar files in the "User classes" tab that you actually
want to run from the bootclasspath and click "Remove." The select the
"Bootstrap classes" tab and add the bootclasspath jars back in using the
"Add External Jars..." button.
Phew!! That should do it. Your launch configuration is saved so that you
only have to go through all that hassle the once.
I'd be curious to know if this works for you, and also if anyone knows a
simpler way of setting up Java/AspectJ projects in Eclipse to do this?
Of course, we'd be delighted to have you contribute to the AJDT project
too :-). I'll post instructions on how to set-up an Eclipse environment to
do that under a separate thread.
-- Adrian.
|
|
|
Re: Setting the exact build environment [message #15271 is a reply to message #15240] |
Tue, 14 January 2003 12:35 |
Martin Moe Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi Adrian
Meanwhile I did a local patch (i chacked (i.e. checked out and hacked :-)
the 0.5.2 release from CVS) with the same trick I described earlier in the
thread, hacking the
ProjectPropertiesAdapter.getBootClasspath
implementation in
org.eclipse.ajdt.internal.ui.ajde.ProjectProperties.
to suit my particular needs. Now, I am not quite sure why I need to have
these two jars in AJDE's bootclasspath rather than the regular classpath. I
just tweeked the ajc command till it worked and that turned out to be the
significant setting.
Ok, so right now I have to launch a run-time workbench with my chacked patch
of AJDT 0.5.2 and build my project using this workbench. Quite cumbersome
since this is a large project (624 class files). So large in fact that I had
to give -Xmx384m to the VM. you can imagine how my poor little portable
starts to sweat :-) My sanity hangs by a thread of 512M of hard memory taped
with a fair bit of patience.
I have no particular problems launching the project once I manage to build
it. Strange isn't it :-)
Anyway, I am looking forward to the new thread you promised.
Martin
"Adrian Colyer" <adrian_colyer@uk.ibm.com> wrote in message
news:avn7op$gtp$1@rogue.oti.com...
> Hi Martin,
> Obviously I can't reproduce your exact build environment, but here's how I
> believe you can configure Eclipse to do what you want when using AJDT
(this
> actually uses simply the features of the Eclipse JDT that AJDT inherits):
>
> First off for compiling...
> Having created your AspectJ project, use the context menu to select the
> project properties, and then select Java Build Path. Go to the libraries
> tab and use "Add External Jars..." to add in the additional Jar files you
> need for compilation.
>
> THEN... go to the "Order and Export" tab and move your newly added jar
> files
> up in order so that they are ahead of (e.g.) rt.jar - if your project
> requires this - it may be that you can omit this step.
>
> That should now enable you to build your project. Incidentally, there's a
> view in AJDT (Window->Show View->Other->AspectJ->AJDT Event Trace) that
> displays diagnostic information as AJDT executes. One of the pieces of
> information you'll find in that view is the exact classpath that AJDT uses
> to perform a compile - can come in very handy for problem solving!!
>
> Then, for running the compiled program:
<...snip...>
>
> I'd be curious to know if this works for you, and also if anyone knows a
> simpler way of setting up Java/AspectJ projects in Eclipse to do this?
See above.
>
> Of course, we'd be delighted to have you contribute to the AJDT project
> too :-). I'll post instructions on how to set-up an Eclipse environment to
> do that under a separate thread.
>
> -- Adrian.
>
>
|
|
|
|
Re: Setting the exact build environment [message #563946 is a reply to message #15207] |
Fri, 10 January 2003 19:43 |
Adrian Colyer Messages: 61 Registered: July 2009 |
Member |
|
|
Hi Martin,
Obviously I can't reproduce your exact build environment, but here's how I
believe you can configure Eclipse to do what you want when using AJDT (this
actually uses simply the features of the Eclipse JDT that AJDT inherits):
First off for compiling...
Having created your AspectJ project, use the context menu to select the
project properties, and then select Java Build Path. Go to the libraries
tab and use "Add External Jars..." to add in the additional Jar files you
need for compilation.
THEN... go to the "Order and Export" tab and move your newly added jar
files
up in order so that they are ahead of (e.g.) rt.jar - if your project
requires this - it may be that you can omit this step.
That should now enable you to build your project. Incidentally, there's a
view in AJDT (Window->Show View->Other->AspectJ->AJDT Event Trace) that
displays diagnostic information as AJDT executes. One of the pieces of
information you'll find in that view is the exact classpath that AJDT uses
to perform a compile - can come in very handy for problem solving!!
Then, for running the compiled program:
Eclipse uses "launchers" that hold runtime configuration information for
launching applications. Because AspectJ creates plain Java class files,
AJDT
simply uses the normal Java launcher, unchanged. Choose "Run..." from the
run menu / icon, and then select "Java Application" and click "New."
Give your new configuration a name, and then click on the "Classpath" tab.
Now you need to deselect the "Use default classpath" option at the bottom
of
the page. Select the jar files in the "User classes" tab that you actually
want to run from the bootclasspath and click "Remove." The select the
"Bootstrap classes" tab and add the bootclasspath jars back in using the
"Add External Jars..." button.
Phew!! That should do it. Your launch configuration is saved so that you
only have to go through all that hassle the once.
I'd be curious to know if this works for you, and also if anyone knows a
simpler way of setting up Java/AspectJ projects in Eclipse to do this?
Of course, we'd be delighted to have you contribute to the AJDT project
too :-). I'll post instructions on how to set-up an Eclipse environment to
do that under a separate thread.
-- Adrian.
|
|
|
Re: Setting the exact build environment [message #563958 is a reply to message #15240] |
Tue, 14 January 2003 12:35 |
Martin Moe Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi Adrian
Meanwhile I did a local patch (i chacked (i.e. checked out and hacked :-)
the 0.5.2 release from CVS) with the same trick I described earlier in the
thread, hacking the
ProjectPropertiesAdapter.getBootClasspath
implementation in
org.eclipse.ajdt.internal.ui.ajde.ProjectProperties.
to suit my particular needs. Now, I am not quite sure why I need to have
these two jars in AJDE's bootclasspath rather than the regular classpath. I
just tweeked the ajc command till it worked and that turned out to be the
significant setting.
Ok, so right now I have to launch a run-time workbench with my chacked patch
of AJDT 0.5.2 and build my project using this workbench. Quite cumbersome
since this is a large project (624 class files). So large in fact that I had
to give -Xmx384m to the VM. you can imagine how my poor little portable
starts to sweat :-) My sanity hangs by a thread of 512M of hard memory taped
with a fair bit of patience.
I have no particular problems launching the project once I manage to build
it. Strange isn't it :-)
Anyway, I am looking forward to the new thread you promised.
Martin
"Adrian Colyer" <adrian_colyer@uk.ibm.com> wrote in message
news:avn7op$gtp$1@rogue.oti.com...
> Hi Martin,
> Obviously I can't reproduce your exact build environment, but here's how I
> believe you can configure Eclipse to do what you want when using AJDT
(this
> actually uses simply the features of the Eclipse JDT that AJDT inherits):
>
> First off for compiling...
> Having created your AspectJ project, use the context menu to select the
> project properties, and then select Java Build Path. Go to the libraries
> tab and use "Add External Jars..." to add in the additional Jar files you
> need for compilation.
>
> THEN... go to the "Order and Export" tab and move your newly added jar
> files
> up in order so that they are ahead of (e.g.) rt.jar - if your project
> requires this - it may be that you can omit this step.
>
> That should now enable you to build your project. Incidentally, there's a
> view in AJDT (Window->Show View->Other->AspectJ->AJDT Event Trace) that
> displays diagnostic information as AJDT executes. One of the pieces of
> information you'll find in that view is the exact classpath that AJDT uses
> to perform a compile - can come in very handy for problem solving!!
>
> Then, for running the compiled program:
<...snip...>
>
> I'd be curious to know if this works for you, and also if anyone knows a
> simpler way of setting up Java/AspectJ projects in Eclipse to do this?
See above.
>
> Of course, we'd be delighted to have you contribute to the AJDT project
> too :-). I'll post instructions on how to set-up an Eclipse environment to
> do that under a separate thread.
>
> -- Adrian.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02218 seconds