ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lopez, William" <>
Subject RE: How to compile a java file?
Date Thu, 04 Sep 2003 13:52:56 GMT

I'm somewhat new to Ant also and found the documentation more than adequate
to get me started....maybe you're just overwhelmed with the being new to
Java is an snippet of a <javac> usage that then jars the result:

  <target name="">
     <javac destdir="${}/Domain" listfiles="true" fork="yes">
        <src path="${src.base}/Domain" />
        <classpath refid="was.lib" />   
        <classpath refid="base.lib" />   
        <classpath refid="classpath.tempjar" />  
     <jar jarfile="${app.module.dir}/Domain.jar"

-----Original Message-----
From: Roy Smith [] 
Sent: Thursday, September 04, 2003 8:21 AM
To: Ant Users List
Cc: Roy Smith
Subject: Re: How to compile a java file?

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:

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

View raw message