From c84ce0470e798a03860bdfd47708d5226e46d93d Mon Sep 17 00:00:00 2001
From: "Jesse N. Glick"
compiles all .java
files under the ${src}
directory, and stores
the .class
files in the ${build}
directory.
The classpath used includes xyz.jar
, and compiling with
-debug information is on.
assert
statements.
<javac srcdir="${src}" destdir="${build}" fork="true" + source="1.2" + target="1.2" />
compiles all .java
files under the ${src}
directory, and stores the .class
files in the
${build}
directory. This will fork off the javac
-compiler using the default javac
executable.
javac
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.
<javac srcdir="${src}" destdir="${build}" fork="java$$javac.exe" + source="1.5" />
compiles all .java
files under the ${src}
directory, and stores the .class
files in the
${build}
directory. This will fork off the javac
compiler, using the executable named java$javac.exe
. Note
-that the $
sign needs to be escaped by a second one.
$
sign needs to be escaped by a second one.
+The source level is 1.5, so you can use generics.
<javac srcdir="${src}" destdir="${build}" @@ -455,7 +463,9 @@ directory, and stores the The classpath used includesxyz.jar
, and debug information is on. Only files undermypackage/p1
andmypackage/p2
are used. All files in and below themypackage/p1/testpackage
-directory are excluded from compilation. +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.<javac srcdir="${src}:${src2}" destdir="${build}"