I guess javac -version is specific to jdk 1.5 since jdk 1.4.1 gives the following out put For javac -version:
javac: invalid flag: -version Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath <path> Specify where to find user class files -sourcepath <path> Specify where to find input source files -bootclasspath <path> Override location of bootstrap class files -extdirs <dirs> Override location of installed extensions -d <directory> Specify where to place generated class files -encoding <encoding> Specify character encoding used by source files -source <release> Provide source compatibility with specified release -target <release> Generate class files for specific VM version -help Print a synopsis of standard options Cheers, //mikael -----Original Message----- From: Scot P. Floess [mailto:[EMAIL PROTECTED] Sent: den 8 juni 2006 13:02 To: Ant Users List Subject: Re: Print exact version of jvm (java -version) For versions of JDK prior to 1.5... I just executed javac -version using JDK 1.5... Mikael Petterson (KI/EAB) wrote: > By the way there is no javac -version :-) but java -version. > > Cheers, > > //mikael > > -----Original Message----- > From: Mikael Petterson (KI/EAB) [mailto:[EMAIL PROTECTED] > Sent: den 8 juni 2006 10:02 > To: Ant Users List > Subject: RE: Print exact version of jvm (java -version) > > I wonder if there is an attribute to the javac task. > > Cheers, > > //mikael > > -----Original Message----- > From: Petar Tahchiev [mailto:[EMAIL PROTECTED] > Sent: den 8 juni 2006 10:00 > To: Ant Users List > Subject: Re: Print exact version of jvm (java -version) > > On 08/06/06, Mikael Petterson (KI/EAB) <[EMAIL PROTECTED]> > wrote: > >> How can I print what compiler is used ( exact version like 'java >> -version') when compiling? >> >> Cheers, >> >> //mikael >> >> >> BUILD.TARGET.VM=1.3 >> BUILD.BOOTCLASSPATH=/app/j2sdk/1.3.1_11/jre/lib/rt.jar >> >> >> <target name="compile" depends="init,setup" description="compile >> product src code"> >> <depend srcdir="${src.dir}" destdir="${classes.dir}" >> cache="depcache" >> closure="yes"/> >> <!-- Both srcdir and destdir should be package roots. --> >> <javac debug="true" deprecation="true" >> destdir="${classes.dir}" >> srcdir="${src.dir}" >> nowarn="${NO.WARN}" >> target="${BUILD.TARGET.VM}" >> bootclasspath="${BUILD.BOOTCLASSPATH}" >> extdirs="" >> fork="true" >> memoryMaximumSize="768m"> >> <classpath refid="common.classpath"/> >> <!-- No test classes --> >> <exclude name="**/tb/**"/> >> <exclude name="**/upfwk/**"/> >> <exclude name="test/**"/> >> <!-- No templates --> >> <exclude name="**/template/**"/> >> </javac> >> </target> >> >> >> > > What's wron with "javac -version" ? > -- > Regards, Petar! > Karlovo, Bulgaria. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For additional > commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For additional > commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For additional > commands, e-mail: [EMAIL PROTECTED] > > > -- Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-754-4592 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]