Use Java 7 on debian if it's available

This commit changes the dependency for java on debian/ubuntu to use 7 if it's available.