You seem to be running Ant with a version 1.5 java compiler but compiling against the class libraries (rt.jar) of a 1.6 installation. You should set up your build.xml so that it will consistently use both (the compiler and the class libraries) of the the same java version.