ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sarsam, Vinitha" <Vinitha.Sar...@FMR.COM>
Subject compile attribute of JAVAC task
Date Fri, 26 Mar 2004 23:03:30 GMT
Hi All,


We are running ANT under 1.4 VM. But, compiling the code with javac 1.3.
( possible through Javac task's executable attribute ).

We have also turned the "source" attribute of javac task. [mainly for
Assert statement compatibility]


But, are running into compilation errors "javac: invalid flag: -source"

This behavior seems to run against Ant's own documentation of the
"source" attribute to the javac task.



Value of the -source command-line switch; will be ignored by all
implementations prior to javac1.4 (or modern when Ant is not running in
a 1.3 VM) and jikes.
If you use this attribute together with jikes, you must make sure that
your version of jikes supports the -source switch.
Legal values are 1.3, 1.4 and 1.5 - by default, no -source argument will
be used at all.


Any ideas how to get around the problem? All inputs appreciated.






    [javac] Since fork is true, ignoring compiler setting.

    [javac] Compiling 32 source files to /<XYZ>/classes

    [javac] Since fork is true, ignoring compiler setting.

    [javac] javac: invalid flag: -source

    [javac] Usage: javac <options> <source files>

    [javac] where possible options include:

    [javac]   -g                        Generate all debugging info

    [javac]   -g:none                   Generate no debugging info

    [javac]   -g:{lines,vars,source}    Generate only some debugging

    [javac]   -O                        Optimize; may hinder debugging
or enlarge class file

    [javac]   -nowarn                   Generate no warnings

    [javac]   -verbose                  Output messages about what the
compiler is doing

    [javac]   -deprecation              Output source locations where
deprecated APIs are used

    [javac]   -classpath <path>         Specify where to find user class

    [javac]   -sourcepath <path>        Specify where to find input
source files

    [javac]   -bootclasspath <path>     Override location of bootstrap
class files

    [javac]   -extdirs <dirs>           Override location of installed

    [javac]   -d <directory>            Specify where to place generated
class files

    [javac]   -encoding <encoding>      Specify character encoding used
by source files

    [javac]   -target <release>         Generate class files for
specific VM version


View raw message