@@ -416,31 +416,39 @@ used.</p>
destdir="${build}"
destdir="${build}"
classpath="xyz.jar"
classpath="xyz.jar"
debug="on"
debug="on"
source="1.4"
/></pre>
/></pre>
<p>compiles all <code>.java</code> files under the <code>${src}</code>
<p>compiles all <code>.java</code> files under the <code>${src}</code>
directory, and stores
directory, and stores
the <code>.class</code> files in the <code>${build}</code> directory.
the <code>.class</code> files in the <code>${build}</code> directory.
The classpath used includes <code>xyz.jar</code>, and compiling with
The classpath used includes <code>xyz.jar</code>, and compiling with
debug information is on.</p>
debug information is on. The source level is 1.4,
so you can use <code>assert</code> statements.</p>
<pre> <javac srcdir="${src}"
<pre> <javac srcdir="${src}"
destdir="${build}"
destdir="${build}"
fork="true"
fork="true"
source="1.2"
target="1.2"
/></pre>
/></pre>
<p>compiles all <code>.java</code> files under the <code>${src}</code>
<p>compiles all <code>.java</code> files under the <code>${src}</code>
directory, and stores the <code>.class</code> files in the
directory, and stores the <code>.class</code> files in the
<code>${build}</code> directory. This will fork off the javac
<code>${build}</code> directory. This will fork off the javac
compiler using the default <code>javac</code> executable.</p>
compiler using the default <code>javac</code> executable.
The source level is 1.2 (similar to 1.1 or 1.3) and
the class files should be runnable under JDK 1.2+ as well.</p>
<pre> <javac srcdir="${src}"
<pre> <javac srcdir="${src}"
destdir="${build}"
destdir="${build}"
fork="java$$javac.exe"
fork="java$$javac.exe"
source="1.5"
/></pre>
/></pre>
<p>compiles all <code>.java</code> files under the <code>${src}</code>
<p>compiles all <code>.java</code> files under the <code>${src}</code>
directory, and stores the <code>.class</code> files in the
directory, and stores the <code>.class</code> files in the
<code>${build}</code> directory. This will fork off the javac
<code>${build}</code> directory. This will fork off the javac
compiler, using the executable named <code>java$javac.exe</code>. Note
compiler, using the executable named <code>java$javac.exe</code>. Note
that the <code>$</code> sign needs to be escaped by a second one.</p>
that the <code>$</code> sign needs to be escaped by a second one.
The source level is 1.5, so you can use generics.</p>
<pre> <javac srcdir="${src}"
<pre> <javac srcdir="${src}"
destdir="${build}"
destdir="${build}"
@@ -455,7 +463,9 @@ directory, and stores the
The classpath used includes <code>xyz.jar</code>, and debug information is on.
The classpath used includes <code>xyz.jar</code>, and debug information is on.
Only files under <code>mypackage/p1</code> and <code>mypackage/p2</code> are
Only files under <code>mypackage/p1</code> and <code>mypackage/p2</code> are
used. All files in and below the <code>mypackage/p1/testpackage</code>
used. All files in and below the <code>mypackage/p1/testpackage</code>
directory are excluded from compilation.</p>
directory are excluded from compilation.
You didn't specify a source or target level,
so the actual values used will depend on which JDK you ran Ant with.</p>
<pre> <javac srcdir="${src}:${src2}"
<pre> <javac srcdir="${src}:${src2}"
destdir="${build}"
destdir="${build}"