I am using Apache Ant to build something on a Ubuntu virtual machine.
When I do ant, and I got the following error:
Buidling failed:import does not support the "as" attribute
The version of java I have is 1.7, and for ant is also 1.7
Any clue? Millions of thanks!
Make sure javac is version 1.7 with
javac -version, that’s what is having a problem parsing theaskeyword, not the java JVM application. The default in Ubuntu 12.10 is still 1.6, so you’d need to manually install a 1.7 JDK and then have it be the default by runningsudo update-alternatives --config java. This page describes the different JVMs you can run in Ubuntu and how to select one.