I\'ve been trying to get this to work for a while now but no luck yet.
I want to run with JAVA_HOME pointing to JDK7 but I want to compile a project for
The problem is with Java 7 backwards compatibility.
There are very few classes that don't preserve backwards compatibility due to impossible to resolve issues of different nature, DataSource happens to be one of them.
So, either you adapt your class to respect the new signatures (even when in backwards compatibility mode), or you'll be forced to use a different version of the virtual machine.
You can read further information here: http://www.oracle.com/technetwork/java/javase/compatibility-417013.html