Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » default Java builder in eclipse
default Java builder in eclipse [message #210246] Wed, 20 July 2005 00:48 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #210369 is a reply to message #210353] Wed, 20 July 2005 14:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: t197197.yahoo.com

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.
I am not sure how to set "eclipse.incrementalBuild". Will it solve this
issue?
Thanks,

Jay
Re: default Java builder in eclipse [message #210384 is a reply to message #210369] Wed, 20 July 2005 16:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thhal.mailblocks.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.
It's likely that the classpath for the java builder isn't configured
property if it produces compilation errors. So yes, in some sense you
will probably need to copy settings from your build.xml to your project
properties (Java Build Path).

> I am not sure how to set "eclipse.incrementalBuild". Will it solve this
> issue?
Not entirely but it will make it possible for you to maintain the
classpath in one place, in Eclipse, and remove such settings from your
build.xml.

eclipse.incrementalBuild is an Ant task that Eclipse provides. Search
for it in the Eclipse help to get more info.

Regards,
Thomas Hallgren
Re: default Java builder in eclipse [message #210498 is a reply to message #210369] Thu, 21 July 2005 10:48 Go to previous message
Eclipse UserFriend
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
Previous Topic:M7 ANT mail-tag hangs
Next Topic:Generate getters and setters programmaticaly
Goto Forum:
  


Current Time: Mon Jun 23 22:38:23 EDT 2025

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

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

Back to the top