I\'m getting compile errors when running the compile task as the sources reference new classes in java.nio.file package that only appeared in Java
compile
java.nio.file
If you use Linux or Mac, another possibility is to look at jenv, a command line Java manager.
It allows you to choose per project which JDK to use.