Last modified 10 years ago Last modified on 02/07/08 12:29:15

The javac Ant target will, by default, will run the compiler within it's internal JVM, selecting the compiler through some opaque mechanism. It does not execute the javac command, so will not use alternatives to choose which java compiler it should use.

You can force ant to use javac command (e.g., /usr/bin/javac), and so control which compiler it uses, by including the following in your ~/.antrc file:


You can then configure which compiler in the usual way:

update-alternatives --config javac