Switch consistently to Java 7.

Java 6 doesn't work, we are using Java 7 features (e.g., java.nio ..).
Minor reformatting.