default Java builder in eclipse [message #210246] |
Wed, 20 July 2005 00:48  |
Eclipse User |
|
|
|
Originally posted by: t197197.yahoo.com
Hi,
I created a eclipse project from an existing source and added a new builder
for build.xml.
Can I disable the default java builder? What does this default builder do?
Thanks,
Jay
|
|
|
Re: default Java builder in eclipse [message #210338 is a reply to message #210246] |
Wed, 20 July 2005 11:53   |
Eclipse User |
|
|
|
Originally posted by: eclipse3.rizzoweb.com
Jay wrote:
> Hi,
> I created a eclipse project from an existing source and added a new builder
> for build.xml.
> Can I disable the default java builder? What does this default builder do?
> Thanks,
It compiles Java code in the Project's defined source directory(ies) and
places the .class files in the Project's defined Build Output Location.
It also copies any non-Java files it finds in the source directory(ies)
to the Build Output Location (such non-code files are considered
"resources" that are needed by the code).
The source directory(ies) and Build Output Location are defined by
choosing Properties from a Java Project right-click menu, under the Java
Build Path section of the Properties.
It is possible to disable the Eclipse Java Builder (in the Builders
section of the project properties), but doing so will make Eclipse a lot
less useful as a Java dev tool.
There are a couple of alternatives:
A) set up the Eclipse build output to be the same as where your Ant
script compiles classes to. That way, Eclipse does the Java compilation
(a task it is very good at) and leaves the rest of your build to Ant.
B) Set up the Eclipse build output to be a separate location altogether
that is ignored by your Ant build. In that case, Ant will do it's own
recompiling according to your script, even if Eclipse has already done
the work.
I use Option A all the time and it works very well. Without the Eclipse
Builder, things like Code Assist and some code navigation features will
not function properly (if at all). In that mode, you are really just
using Eclipse as a bloated file explorer and text editor.
HTH,
Eric
|
|
|
Re: default Java builder in eclipse [message #210353 is a reply to message #210338] |
Wed, 20 July 2005 12:28   |
Eclipse User |
|
|
|
Originally posted by: thhal.mailblocks.com
A third alternative that provides an even tighter integration and can
work really well is to have the 'A' configuration that Eric mentions and
let then use the Eclipse provided task "eclipse.incrementalBuild"
instead of a traditional "javac". Often saves a lot of messing around
with classpaths etc.
Regards,
Thomas Hallgren
Eric Rizzo wrote:
> Jay wrote:
>
>> Hi,
>> I created a eclipse project from an existing source and added a new
>> builder for build.xml.
>> Can I disable the default java builder? What does this default builder
>> do?
>> Thanks,
>
>
> It compiles Java code in the Project's defined source directory(ies) and
> places the .class files in the Project's defined Build Output Location.
> It also copies any non-Java files it finds in the source directory(ies)
> to the Build Output Location (such non-code files are considered
> "resources" that are needed by the code).
> The source directory(ies) and Build Output Location are defined by
> choosing Properties from a Java Project right-click menu, under the Java
> Build Path section of the Properties.
>
> It is possible to disable the Eclipse Java Builder (in the Builders
> section of the project properties), but doing so will make Eclipse a lot
> less useful as a Java dev tool.
>
> There are a couple of alternatives:
> A) set up the Eclipse build output to be the same as where your Ant
> script compiles classes to. That way, Eclipse does the Java compilation
> (a task it is very good at) and leaves the rest of your build to Ant.
>
> B) Set up the Eclipse build output to be a separate location altogether
> that is ignored by your Ant build. In that case, Ant will do it's own
> recompiling according to your script, even if Eclipse has already done
> the work.
>
> I use Option A all the time and it works very well. Without the Eclipse
> Builder, things like Code Assist and some code navigation features will
> not function properly (if at all). In that mode, you are really just
> using Eclipse as a bloated file explorer and text editor.
>
> HTH,
> Eric
|
|
|
|
|
Re: default Java builder in eclipse [message #210498 is a reply to message #210369] |
Thu, 21 July 2005 10:48  |
Eclipse User |
|
|
|
Originally posted by: eclipse3.rizzoweb.com
Jay wrote:
> The ant builder works fine but the java builder produces many compilation
> errors.
> How to config the default java builder to get rid of the compilation errors?
> I hope it is not needed to dup the settings in build.xml.
Right-click the project and select Properties, then Java Build Path.
There you configure your source directory(ies) and libraries (JARs) or
other projects that it depends on.
It would help you a great deal to go through the tutorials from the
Eclipse Help. And also try looking in Help under Java Dev > Concepts >
Java Builder. Without understanding the material in those tutorials, you
are really limiting how much you take advantage of Eclipse's features
and power.
HTH,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.05915 seconds