ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Smith <>
Subject Re: How to compile a java file?
Date Thu, 04 Sep 2003 13:20:31 GMT

On Thursday, September 4, 2003, at 08:54  AM, wrote:

> "Using Ant" is a good start, I think. For beginners the "Writing a 
> Simple
> Buildfile"
> is the right point. It describes the buildfile syntax, provides links 
> to the
> task list
> and gives an example.
> And if you have a look at that example you see how to compile sources.

The problem is that I *did* read the example, and didn't get it.  It 
got lost in the noise.  As a first example, I think it's too 
complicated.  Maybe the problem is that I was still in the Make mindset 
of looking for a rule which explicitly showed how a class file depended 
on a java file?  In any case, I read right past the javac line and 
didn't "get" that this was what I was looking for.

Maybe start with Jan.Materne's trivial example of:

<project default="compile">
     <target name="compile">
         <javac srcdir="."/>

and an explanation that this will complile all the java files in the 
current directory.   Then say, "And, a slightly more complex example 
showing how this might work in a real project", and give the example 
that's currently in the doc.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message