Replace Java 7 with Java 6 solution