I have a number of projects running on a Hudson slave. I\'d like one of them to run Ant under Java6, rather than the default (which is Java5 in my environment).
We have both Java 5 and Java 6 configured for use in our Hudson instance.
Under Manage Hudson -> Configuration System you can add a number of JDKs and specify the path for JAVA_HOME. In the configuration for each job you then selected which JDK you would like that job to run on.