Sheila's Blog

Software Development

Sheila's Blog header image 2

Use a different compiler with ant’s javac task

March 9th, 2009 by Sheila

To ignore the JAVA_HOME settings and specify the compiler to use in ant’s javac task set the following properties:

build.properties: # Set the jdk compiler properties build.javac.executable=C:/Applications/Java/jdk1.5.0_13/bin/javac.exe build.javac.compiler=javac1.5

Then in the build script use: <javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="${classpath}" debug="${debug.flag}" fork="yes" executable="${build.javac.executable}" compiler="${build.javac.compiler}"/>

Tags:   No Comments

Leave a Comment

0 responses so far ↓

There are no comments yet...Kick things off by filling out the form below.