jglick 2004/12/10 15:17:34 Modified: docs/manual/CoreTasks Tag: ANT_16_BRANCH javac.html Log: merge Revision Changes Path No revision No revision 1.42.2.7 +14 -4 ant/docs/manual/CoreTasks/javac.html Index: javac.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/javac.html,v retrieving revision 1.42.2.6 retrieving revision 1.42.2.7 diff -u -r1.42.2.6 -r1.42.2.7 --- javac.html 19 Nov 2004 09:10:00 -0000 1.42.2.6 +++ javac.html 10 Dec 2004 23:17:34 -0000 1.42.2.7 @@ -416,31 +416,39 @@ destdir="${build}" classpath="xyz.jar" debug="on" + source="1.4" /></pre> <p>compiles all <code>.java</code> files under the <code>${src}</code> directory, and stores the <code>.class</code> files in the <code>${build}</code> directory. 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}" destdir="${build}" fork="true" + source="1.2" + target="1.2" /></pre> <p>compiles all <code>.java</code> files under the <code>${src}</code> directory, and stores the <code>.class</code> files in the <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}" destdir="${build}" fork="java$$javac.exe" + source="1.5" /></pre> <p>compiles all <code>.java</code> files under the <code>${src}</code> directory, and stores the <code>.class</code> files in the <code>${build}</code> directory. This will fork off the javac 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}" destdir="${build}" @@ -455,7 +463,9 @@ 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 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}" destdir="${build}"
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]