For the Ant javac
task below, is there a resource that lists the values of source
, target
, and compiler
for various JDK versions?
<target name="_compile" depends="">
<echo message='compile excludes ${javac.excludes} includes ${javac.includes}'/>
<javac
srcdir="${javac.srcdir}"
destdir="${javac.destdir}"
classpathref="project.class.path"
classpath="${javac.classpath}"
includes="${javac.includes}"
excludes="${javac.excludes}"
compiler="${javac.compiler}"
source="${javac.source}"
target="${javac.target}"
nowarn="${javac.nowarn}"
optimize="${javac.optimize}"
deprecation="${javac.deprecation}"
verbose="${javac.verbose}"
debug="${javac.debug}"
debuglevel="${javac.debuglevel}"
fork="${java.fork}"
listfiles="${javac.listfiles}"
includeantruntime="false"
/>
</target>
The values for the Ant build file are managed in project-specific property files. For example, a legacy project that I was working on had javac.source=1.8
, javac.target=1.8
, javac.compiler=javac1.8
. My priority is to find out these values for the LTS versions of JDK (i.e 11 and 17), but it would be great if I can see all the various values.